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

Unified Diff: chrome/browser/resources/settings/route.js

Issue 2763423002: MD Settings: Fix endless recursion when exiting CBD dialog. (Closed)
Patch Set: Fix more Created 3 years, 9 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
Index: chrome/browser/resources/settings/route.js
diff --git a/chrome/browser/resources/settings/route.js b/chrome/browser/resources/settings/route.js
index fa0b68482579a3f41803ee018523cbac05e18c23..ae0fc19bdaf5df99d97bf0b485d79a47580a25f9 100644
--- a/chrome/browser/resources/settings/route.js
+++ b/chrome/browser/resources/settings/route.js
@@ -369,6 +369,11 @@ cr.define('settings', function() {
* parameter during navigation. Defaults to false.
*/
var navigateTo = function(route, opt_dynamicParameters, opt_removeSearch) {
+ // The ADVANCED route only serves as a parent of subpages, and should not
+ // be possible to navigate to it directly.
+ if (route == settings.Route.ADVANCED)
+ route = settings.Route.BASIC;
+
var params = opt_dynamicParameters || new URLSearchParams();
var removeSearch = !!opt_removeSearch;

Powered by Google App Engine
This is Rietveld 408576698