wip: only buffer suspense effects when unresolved

This commit is contained in:
Evan You 2019-09-11 09:04:03 -04:00
parent 9ef987830d
commit 6bc368b2b6

View File

@ -82,13 +82,15 @@ function queuePostEffect(
fn: Function | Function[],
suspense: SuspenseBoundary<any, any> | null
) {
if (suspense === null) {
queuePostFlushCb(fn)
} else if (isArray(fn)) {
if (suspense !== null && !suspense.isResolved) {
if (isArray(fn)) {
suspense.effects.push(...fn)
} else {
suspense.effects.push(fn)
}
} else {
queuePostFlushCb(fn)
}
}
export interface RendererOptions<HostNode = any, HostElement = any> {