Chromium Code Reviews| Index: chrome/browser/resources/settings/route.js |
| diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js |
| index 61145399564c443aa1cbacc1ebf258f993685994..14b6800a17a0723d604b7b847e0fbc2b8f7938e9 100644 |
| --- a/chrome/browser/resources/settings/route.js |
| +++ b/chrome/browser/resources/settings/route.js |
| @@ -74,7 +74,8 @@ cr.define('settings', function() { |
| * @return {boolean} |
| */ |
| isSubpage: function() { |
| - return !!this.parent && this.parent.section == this.section; |
| + return !!this.parent && !!this.section && |
| + this.parent.section == this.section; |
| }, |
| }; |
| @@ -126,8 +127,7 @@ cr.define('settings', function() { |
| // CLEAR_BROWSER_DATA is the only navigable dialog route. It's the only child |
| // of a section that's not a subpage. Don't add any more routes like these. |
|
michaelpg
2016/08/16 23:28:02
Update comment?
tommycli
2016/08/16 23:50:08
Done.
|
| // If more navigable dialogs are needed, add explicit support in Route. |
| - r.CLEAR_BROWSER_DATA = r.PRIVACY.createChild('/clearBrowserData'); |
| - r.CLEAR_BROWSER_DATA.isSubpage = function() { return false; }; |
| + r.CLEAR_BROWSER_DATA = r.ADVANCED.createChild('/clearBrowserData'); |
| r.SITE_SETTINGS = r.PRIVACY.createChild('/siteSettings'); |
| r.SITE_SETTINGS_ALL = r.SITE_SETTINGS.createChild('all'); |