Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

process.env is undefined #723

wants to merge 3 commits into from

Conversation

aylanbrown
Copy link

No description provided.

@coveralls
Copy link

coveralls commented Sep 3, 2019

Coverage Status

Coverage remained the same at 87.692% when pulling 60e443b on aylanbrown:master into 5c7c61d on visionmedia:master.

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) {
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I changed it

@Qix-
Copy link
Member

Qix- commented Sep 3, 2019

Can you squash please? :)

@aylanbrown
Copy link
Author

Can you squash please? :)

I built my project by webpack, and browser throw 'production is not undefined'. Check only process.env is undefined is useless, I use try {} catch(e){} to resolve it

@Qix-
Copy link
Member

Qix- commented Sep 4, 2019

Huh? I mean squash your commits with git.

@xamgore
Copy link

xamgore commented Sep 10, 2019

@Qix-, github allows to squash commits and merge them:

illustration

@Qix-
Copy link
Member

Qix- commented Sep 10, 2019

@xamgore I'm very aware. I was not near a computer at the time and the mobile client does not have the feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants