Skip to content

Commit

Permalink
fix: do not call warnOnce function in production (#1520)
Browse files Browse the repository at this point in the history
  • Loading branch information
korvin89 authored Apr 17, 2024
1 parent 5456b87 commit 9ab7d7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/utils/warn.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const didWarn = new Map<string, boolean>();

export function warnOnce(msg: string) {
if (!msg || didWarn.has(msg)) {
if (!msg || didWarn.has(msg) || process.env.NODE_ENV === 'production') {
return;
}

Expand Down

0 comments on commit 9ab7d7c

Please sign in to comment.