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

This commit is contained in:
三咲智子 Kevin Deng 2024-05-13 02:19:11 +08:00
parent e2b51d6e7a
commit 4f9052358e
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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)