From 9ab7d7c86a06a6f94126a87acfb23033709ec8a1 Mon Sep 17 00:00:00 2001 From: "Mr.Dr.Professor Patrick" Date: Wed, 17 Apr 2024 18:00:52 +0200 Subject: [PATCH] fix: do not call warnOnce function in production (#1520) --- src/components/utils/warn.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/utils/warn.ts b/src/components/utils/warn.ts index 2d1b9b6e4a..a86b0bbee7 100644 --- a/src/components/utils/warn.ts +++ b/src/components/utils/warn.ts @@ -1,7 +1,7 @@ const didWarn = new Map(); export function warnOnce(msg: string) { - if (!msg || didWarn.has(msg)) { + if (!msg || didWarn.has(msg) || process.env.NODE_ENV === 'production') { return; }