Skip to content

Commit d33292d

Browse files
committed
chore: return early in warn() in prod
1 parent 3e223f1 commit d33292d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/runtime-core/src/warning.ts

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export function popWarningContext() {
3131
}
3232

3333
export function warn(msg: string, ...args: any[]) {
34+
if (!__DEV__) return
35+
3436
// avoid props formatting or warn handler tracking deps that might be mutated
3537
// during patch, leading to infinite recursion.
3638
pauseTracking()

0 commit comments

Comments
 (0)