]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: return early in warn() in prod
authorEvan You <yyx990803@gmail.com>
Wed, 9 Nov 2022 03:48:35 +0000 (11:48 +0800)
committerEvan You <yyx990803@gmail.com>
Wed, 9 Nov 2022 03:48:35 +0000 (11:48 +0800)
packages/runtime-core/src/warning.ts

index ad31bc817cdb92c9c36ccb2324f61c4b977e311f..9b793ab514847472a1488d77d91e77c81c3119d0 100644 (file)
@@ -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()