mirror of https://github.com/vuejs/core.git
fix(templateRef): delay setting the ref value if wrapped in Suspense
This commit is contained in:
parent
29de6f8b0b
commit
58cf2365e4
|
@ -28,6 +28,13 @@ export function setRef(
|
|||
vnode: VNode,
|
||||
isUnmount = false,
|
||||
): void {
|
||||
if (parentSuspense) {
|
||||
queuePostRenderEffect(() => {
|
||||
setRef(rawRef, oldRawRef, null, vnode, isUnmount)
|
||||
}, parentSuspense)
|
||||
return
|
||||
}
|
||||
|
||||
if (isArray(rawRef)) {
|
||||
rawRef.forEach((r, i) =>
|
||||
setRef(
|
||||
|
|
Loading…
Reference in New Issue