Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2335)

Unified Diff: remoting/webapp/crd/js/typecheck.js

Issue 888323002: Improve HRD first run experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for Checkin Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/webapp/crd/js/remoting.js ('k') | remoting/webapp/js_proto/chrome_proto.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 + ')';
« no previous file with comments | « remoting/webapp/crd/js/remoting.js ('k') | remoting/webapp/js_proto/chrome_proto.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698