diff --git a/packages/runtime-core/src/createRenderer.ts b/packages/runtime-core/src/createRenderer.ts index 62d38d71..f7eb3fc0 100644 --- a/packages/runtime-core/src/createRenderer.ts +++ b/packages/runtime-core/src/createRenderer.ts @@ -82,12 +82,14 @@ function queuePostEffect( fn: Function | Function[], suspense: SuspenseBoundary | null ) { - if (suspense === null) { - queuePostFlushCb(fn) - } else if (isArray(fn)) { - suspense.effects.push(...fn) + if (suspense !== null && !suspense.isResolved) { + if (isArray(fn)) { + suspense.effects.push(...fn) + } else { + suspense.effects.push(fn) + } } else { - suspense.effects.push(fn) + queuePostFlushCb(fn) } }