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

default browser check should run only on release build #4959

Merged
merged 1 commit into from
Oct 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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