wip: only buffer suspense effects when unresolved
This commit is contained in:
parent
9ef987830d
commit
6bc368b2b6
@ -82,12 +82,14 @@ function queuePostEffect(
|
|||||||
fn: Function | Function[],
|
fn: Function | Function[],
|
||||||
suspense: SuspenseBoundary<any, any> | null
|
suspense: SuspenseBoundary<any, any> | null
|
||||||
) {
|
) {
|
||||||
if (suspense === null) {
|
if (suspense !== null && !suspense.isResolved) {
|
||||||
queuePostFlushCb(fn)
|
if (isArray(fn)) {
|
||||||
} else if (isArray(fn)) {
|
suspense.effects.push(...fn)
|
||||||
suspense.effects.push(...fn)
|
} else {
|
||||||
|
suspense.effects.push(fn)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
suspense.effects.push(fn)
|
queuePostFlushCb(fn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user