Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4959 from darkdh/4958
Browse files Browse the repository at this point in the history
default browser check should run only on release build
  • Loading branch information
bridiver committed Oct 19, 2016
2 parents cfb4675 + 6192282 commit d2c32e2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,18 @@ app.on('ready', () => {
}
process.emit(messages.APP_INITIALIZED)

// Default browser checking
let isDefaultBrowser = defaultProtocols.every(p => app.isDefaultProtocolClient(p))
appActions.changeSetting(settings.IS_DEFAULT_BROWSER, isDefaultBrowser)
if (process.env.BRAVE_IS_DEFAULT_BROWSER !== undefined) {
if (process.env.BRAVE_IS_DEFAULT_BROWSER === 'true') {
appActions.changeSetting(settings.IS_DEFAULT_BROWSER, true)
} else if (process.env.BRAVE_IS_DEFAULT_BROWSER === 'false') {
appActions.changeSetting(settings.IS_DEFAULT_BROWSER, false)
}
} else {
// Default browser checking
let isDefaultBrowser = ['development', 'test'].includes(process.env.NODE_ENV)
? true : defaultProtocols.every(p => app.isDefaultProtocolClient(p))
appActions.changeSetting(settings.IS_DEFAULT_BROWSER, isDefaultBrowser)
}

if (CmdLine.newWindowURL) {
appActions.newWindow(Immutable.fromJS({
Expand Down

0 comments on commit d2c32e2

Please sign in to comment.