We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27afbaf commit 7971b04Copy full SHA for 7971b04
packages/runtime-core/src/directives.ts
@@ -126,8 +126,9 @@ export function withDirectives<T extends VNode>(
126
}
127
// inject onVnodeXXX hooks
128
for (const key in dir) {
129
- if (!injected[key]) {
130
- const { 0: hookName, 1: hook } = directiveToVnodeHooksMap[key]
+ const mapped = directiveToVnodeHooksMap[key]
+ if (mapped && !injected[key]) {
131
+ const { 0: hookName, 1: hook } = mapped
132
const existing = props[hookName]
133
props[hookName] = existing ? [].concat(existing, hook as any) : hook
134
injected[key] = true
0 commit comments