Skip to content

Commit 7d6acd0

Browse files
authored
process.env is undefined
1 parent 5c7c61d commit 7d6acd0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/browser.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ function load() {
213213
}
214214

215215
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
216-
if (!r && typeof process !== 'undefined' && 'env' in process) {
216+
// process.env is undefined in sometimes, and it will throw a exception
217+
if (!r && typeof process !== 'undefined' && 'env' in process && process.env !== undefined) {
217218
r = process.env.DEBUG;
218219
}
219220

0 commit comments

Comments
 (0)