Index: chrome/browser/resources/settings/basic_page/basic_page.js |
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.js b/chrome/browser/resources/settings/basic_page/basic_page.js |
index fe8cc8629fefeca5e288ccda49a0e075c5abfaa2..1f386cc6218091f2963d0357ee84a543d012dbb0 100644 |
--- a/chrome/browser/resources/settings/basic_page/basic_page.js |
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js |
@@ -115,7 +115,7 @@ Polymer({ |
currentRouteChanged: function(newRoute, oldRoute) { |
this.currentRoute_ = newRoute; |
- if (settings.Route.ADVANCED.contains(newRoute)) |
+ if (settings.routes.ADVANCED && settings.routes.ADVANCED.contains(newRoute)) |
this.advancedToggleExpanded = true; |
if (oldRoute && oldRoute.isSubpage()) { |
@@ -258,7 +258,7 @@ Polymer({ |
* @private |
*/ |
showBasicPage_: function(currentRoute, inSearchMode, hasExpandedSection) { |
- return !hasExpandedSection || settings.Route.BASIC.contains(currentRoute); |
+ return !hasExpandedSection || settings.routes.BASIC.contains(currentRoute); |
}, |
/** |
@@ -272,8 +272,10 @@ Polymer({ |
*/ |
showAdvancedPage_: function( |
currentRoute, inSearchMode, hasExpandedSection, advancedToggleExpanded) { |
- return hasExpandedSection ? settings.Route.ADVANCED.contains(currentRoute) : |
- advancedToggleExpanded || inSearchMode; |
+ return hasExpandedSection ? |
+ (settings.routes.ADVANCED && |
+ settings.routes.ADVANCED.contains(currentRoute)) : |
+ advancedToggleExpanded || inSearchMode; |
}, |
/** |