Skip to content

Commit 0bdfa66

Browse files
fix(runtime-core): add patchFlag to element containing ref attributes
1 parent b775b71 commit 0bdfa66

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/compiler-core/src/transforms/transformElement.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,11 @@ export function buildProps(
747747
}
748748
}
749749
if (
750-
!shouldUseBlock &&
751-
(patchFlag === 0 || patchFlag === PatchFlags.HYDRATE_EVENTS) &&
752-
(hasRef || hasVnodeHook || runtimeDirectives.length > 0)
750+
// #9239
751+
hasRef ||
752+
(!shouldUseBlock &&
753+
(patchFlag === 0 || patchFlag === PatchFlags.HYDRATE_EVENTS) &&
754+
(hasVnodeHook || runtimeDirectives.length > 0))
753755
) {
754756
patchFlag |= PatchFlags.NEED_PATCH
755757
}

0 commit comments

Comments
 (0)