feat(compile-core): handle falsy dynamic args for v-on and v-bind (#2393)
fix #2388
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import {
|
||||
ComponentInternalInstance,
|
||||
LifecycleHooks,
|
||||
currentInstance,
|
||||
setCurrentInstance,
|
||||
isInSSRComponentSetup
|
||||
isInSSRComponentSetup,
|
||||
LifecycleHooks,
|
||||
setCurrentInstance
|
||||
} from './component'
|
||||
import { ComponentPublicInstance } from './componentPublicInstance'
|
||||
import { callWithAsyncErrorHandling, ErrorTypeStrings } from './errorHandling'
|
||||
import { warn } from './warning'
|
||||
import { capitalize } from '@vue/shared'
|
||||
import { pauseTracking, resetTracking, DebuggerEvent } from '@vue/reactivity'
|
||||
import { toHandlerKey } from '@vue/shared'
|
||||
import { DebuggerEvent, pauseTracking, resetTracking } from '@vue/reactivity'
|
||||
|
||||
export { onActivated, onDeactivated } from './components/KeepAlive'
|
||||
|
||||
@@ -49,9 +49,7 @@ export function injectHook(
|
||||
}
|
||||
return wrappedHook
|
||||
} else if (__DEV__) {
|
||||
const apiName = `on${capitalize(
|
||||
ErrorTypeStrings[type].replace(/ hook$/, '')
|
||||
)}`
|
||||
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''))
|
||||
warn(
|
||||
`${apiName} is called when there is no active component instance to be ` +
|
||||
`associated with. ` +
|
||||
|
||||
Reference in New Issue
Block a user