Skip to content

Commit

Permalink
fix(errors): potential fix regression of env var check (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Oct 28, 2022
1 parent e0cf153 commit 1d3a805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/errors/src/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const AssertionError = defError<any>(() => "Assertion failed");
* the `UMBRELLA_ASSERTS` or `VITE_UMBRELLA_ASSERTS` env var is set to 1.
*/
export const assert = (
typeof process !== "undefined"
typeof process !== "undefined" && process.env !== undefined
? process.env.NODE_ENV !== "production" ||
!!process.env.UMBRELLA_ASSERTS
: (<any>import.meta).env
Expand Down

0 comments on commit 1d3a805

Please sign in to comment.