Skip to content

Commit

Permalink
Merge pull request #9805 from brave/maxk-cr93fu-guest-settings
Browse files Browse the repository at this point in the history
[cr93 followup] Fixes brave://settings in Guest window.
  • Loading branch information
mkarolin committed Aug 24, 2021
1 parent 6a716a7 commit 53bd973
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions browser/resources/settings/brave_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
// you can obtain one at http://mozilla.org/MPL/2.0/.

import {pageVisibility} from './brave_overrides/page_visibility.js'
import {loadTimeData} from './i18n_setup.js'

export default function addBraveRoutes(r) {
const isGuest = loadTimeData.getBoolean('isGuest')
if (!r.BASIC) {
console.error('[Brave Settings Overrides] Routes: could not find BASIC page')
}
if (r.SITE_SETTINGS_ADS) {
delete r.SITE_SETTINGS_ADS
} else {
console.error('[Brave Settings Overrides] could not find expected route site_settings_ads')
}
if (pageVisibility.getStarted) {
r.GET_STARTED = r.BASIC.createSection('/getStarted', 'getStarted')
// bring back people's /manageProfile (now in getStarted)
Expand Down Expand Up @@ -43,6 +40,11 @@ export default function addBraveRoutes(r) {
if (isNativeBraveWalletFeatureEnabled) {
r.SITE_SETTINGS_ETHEREUM = r.SITE_SETTINGS.createChild('ethereum')
}
if (r.SITE_SETTINGS_ADS) {
delete r.SITE_SETTINGS_ADS
} else {
console.error('[Brave Settings Overrides] could not find expected route site_settings_ads')
}
} else if (!isGuest) {
console.error('[Brave Settings Overrides] Routes: could not find SITE_SETTINGS page')
}
Expand Down

0 comments on commit 53bd973

Please sign in to comment.