Skip to content

Commit

Permalink
chore: return early in warn() in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 9, 2022
1 parent 3e223f1 commit d33292d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/runtime-core/src/warning.ts
Expand Up @@ -31,6 +31,8 @@ export function popWarningContext() {
}

export function warn(msg: string, ...args: any[]) {
if (!__DEV__) return

// avoid props formatting or warn handler tracking deps that might be mutated
// during patch, leading to infinite recursion.
pauseTracking()
Expand Down

0 comments on commit d33292d

Please sign in to comment.