return node
}
- if (!currentInstance.dirs.has(node)) currentInstance.dirs.set(node, [])
- const bindings = currentInstance.dirs.get(node)!
+ const instance = currentInstance
+ if (!instance.dirs.has(node)) instance.dirs.set(node, [])
+ const bindings = instance.dirs.get(node)!
for (const directive of directives) {
let [dir, source, arg, modifiers] = directive
const binding: DirectiveBinding = {
dir,
- instance: currentInstance,
+ instance,
source,
value: null, // set later
oldValue: null,
bindings.push(binding)
callDirectiveHook(node, binding, 'created')
+
effect(() => {
- if (!currentInstance!.isMountedRef.value) return
+ if (!instance.isMountedRef.value) return
callDirectiveHook(node, binding, 'updated')
})
}