Skip to content

process.env is undefined#723

Open
aylanbrown wants to merge 3 commits into
debug-js:masterfrom
aylanbrown:master
Open

process.env is undefined#723
aylanbrown wants to merge 3 commits into
debug-js:masterfrom
aylanbrown:master

Conversation

@aylanbrown

Copy link
Copy Markdown

No description provided.

@coveralls

coveralls commented Sep 3, 2019

Copy link
Copy Markdown

Coverage Status

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

Comment thread src/browser.js Outdated
// 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
Copy Markdown
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
Copy Markdown
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-

Qix- commented Sep 3, 2019

Copy link
Copy Markdown
Member

Can you squash please? :)

@aylanbrown

Copy link
Copy Markdown
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-

Qix- commented Sep 4, 2019

Copy link
Copy Markdown
Member

Huh? I mean squash your commits with git.

@xamgore

xamgore commented Sep 10, 2019

Copy link
Copy Markdown

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

illustration

@Qix-

Qix- commented Sep 10, 2019

Copy link
Copy Markdown
Member

@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