Fix isProduction() detection
In the renderer process on OS X, config.IS_PRODUCTION was always true because process.execPath is to "Electron Helper", so the detection regex was being overly specific.
This commit is contained in:
parent
ac0574a473
commit
80faba8234
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ function isProduction () {
|
|||
return false
|
||||
}
|
||||
if (process.platform === 'darwin') {
|
||||
return !/\/Electron\.app\/Contents\/MacOS\/Electron$/.test(process.execPath)
|
||||
return !/\/Electron\.app\//.test(process.execPath)
|
||||
}
|
||||
if (process.platform === 'win32') {
|
||||
return !/\\electron\.exe$/.test(process.execPath)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue