Skip to content

Commit 64e9c96

Browse files
authored
refactor(runtime-core): use currentRenderingInstance directly
1 parent 9c54dac commit 64e9c96

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/runtime-core/src/directives.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,13 @@ export function withDirectives<T extends VNode>(
8888
vnode: T,
8989
directives: DirectiveArguments,
9090
): T {
91-
const internalInstance = currentRenderingInstance
92-
if (internalInstance === null) {
91+
if (currentRenderingInstance === null) {
9392
__DEV__ && warn(`withDirectives can only be used inside render functions.`)
9493
return vnode
9594
}
9695
const instance =
97-
(getExposeProxy(internalInstance) as ComponentPublicInstance) ||
98-
internalInstance.proxy
96+
(getExposeProxy(currentRenderingInstance) as ComponentPublicInstance) ||
97+
currentRenderingInstance.proxy
9998
const bindings: DirectiveBinding[] = vnode.dirs || (vnode.dirs = [])
10099
for (let i = 0; i < directives.length; i++) {
101100
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]

0 commit comments

Comments
 (0)