Skip to content

Commit

Permalink
fix(shared-utils): process?.env will not transform to env by transcom…
Browse files Browse the repository at this point in the history
…piler (#4327)

* Fix (console.ts): process?.env will not transform to env by transcompiler

* chore(changeset): add changeset

---------

Co-authored-by: WK Wong <[email protected]>
  • Loading branch information
s524797336 and wingkwong authored Dec 12, 2024
1 parent 2fb6efa commit 77206bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clever-teachers-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/shared-utils": patch
---

fix process is not defined
2 changes: 1 addition & 1 deletion packages/utilities/shared-utils/src/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function warn(message: string, component?: string, ...args: any[]) {
if (warningStack[log]) return;
warningStack[log] = true;

if (process?.env?.NODE_ENV !== "production") {
if (process.env.NODE_ENV !== "production") {
// eslint-disable-next-line no-console
return console.warn(log, args);
}
Expand Down

0 comments on commit 77206bc

Please sign in to comment.