Selaa lähdekoodia

fix: pass warn to `toHandlers` only on dev mode

三咲智子 Kevin Deng 1 vuosi sitten
vanhempi
commit
4f9052358e

+ 2 - 1
packages/runtime-core/src/helpers/toHandlers.ts

@@ -1,4 +1,5 @@
 import { toHandlers as _toHandlers } from '@vue/runtime-shared'
 import { warn } from '../warning'
+import { NOOP } from '@vue/shared'
 
-export const toHandlers = _toHandlers.bind(undefined, warn)
+export const toHandlers = _toHandlers.bind(undefined, __DEV__ ? warn : NOOP)

+ 2 - 1
packages/runtime-vapor/src/helpers/toHandlers.ts

@@ -1,4 +1,5 @@
 import { toHandlers as _toHandlers } from '@vue/runtime-shared'
 import { warn } from '../warning'
+import { NOOP } from '@vue/shared'
 
-export const toHandlers = _toHandlers.bind(undefined, warn)
+export const toHandlers = _toHandlers.bind(undefined, __DEV__ ? warn : NOOP)