Skip to content

Check process.env exists #199

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

Closed
wants to merge 1 commit into from
Closed

Check process.env exists #199

wants to merge 1 commit into from

Conversation

masaha03
Copy link

@masaha03 masaha03 commented Feb 8, 2022

Some build systems or other sometimes add window.process in browser but not always add window.process.env.
For example, a project created with Nuxt3 will crash due to this problem.
Please check process.env exists or not.

Some build systems or other sometimes add `window.process` in browser but not always add  `window.process.env`.
For example, a project created with Nuxt3 will crash due to this problem.
Please check `process.env` exists or not.
@codecov-commenter
Copy link

Codecov Report

Merging #199 (79b419f) into main (b041a96) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files          16       16           
  Lines         964      964           
  Branches      206      206           
=======================================
  Hits          946      946           
  Misses         18       18           
Impacted Files Coverage Δ
src/utils/utf8.ts 95.14% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b041a96...79b419f. Read the comment docs.

@gfx
Copy link
Member

gfx commented Feb 8, 2022

Thank you for the PR. It sounds almost good to me, but I rather prefer to use the latest syntax for null checking: #200 can you take a look at it?

@masaha03
Copy link
Author

masaha03 commented Feb 8, 2022

No problem at all. I'll close this PR.

@masaha03 masaha03 closed this Feb 8, 2022
@gfx
Copy link
Member

gfx commented Feb 8, 2022

Thank you!

@gfx
Copy link
Member

gfx commented Feb 8, 2022

v2.7.2 has been released with the fix.

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

Successfully merging this pull request may close these issues.

3 participants