-
Notifications
You must be signed in to change notification settings - Fork 944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process.env is undefined #723
base: master
Are you sure you want to change the base?
Conversation
src/browser.js
Outdated
@@ -213,7 +213,8 @@ function load() { | |||
} | |||
|
|||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG | |||
if (!r && typeof process !== 'undefined' && 'env' in process) { | |||
// process.env is undefined in sometimes, and it will throw a exception | |||
if (!r && typeof process !== 'undefined' && 'env' in process && process.env !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second two checks can be simplified as just process.env
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I changed it
Can you squash please? :) |
I built my project by webpack, and browser throw 'production is not undefined'. Check only |
Huh? I mean squash your commits with git. |
@Qix-, github allows to squash commits and merge them: |
@xamgore I'm very aware. I was not near a computer at the time and the mobile client does not have the feature. |
No description provided.