Index: remoting/webapp/crd/js/typecheck.js |
diff --git a/remoting/webapp/crd/js/typecheck.js b/remoting/webapp/crd/js/typecheck.js |
index fa31f55a3cc8b66cf44c18d88777b49660e782d7..7365238a40ca9797a949c57befdd2fd2930cdbee 100644 |
--- a/remoting/webapp/crd/js/typecheck.js |
+++ b/remoting/webapp/crd/js/typecheck.js |
@@ -41,7 +41,10 @@ function getArrayAttr(dict, key, opt_default) { |
*/ |
function getBooleanAttr(dict, key, opt_default) { |
var value = /** @type {boolean} */ (dict[key]); |
- if (typeof value != 'boolean') { |
+ if (value == 'true' || value == 'false') { |
+ return (value == 'true'); |
+ } |
+ if (typeof value !== 'boolean') { |
if (opt_default === undefined) { |
throw 'Invalid data type for ' + key + |
' (expected: boolean, actual: ' + typeof value + ')'; |