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[],
|
||||
suspense: SuspenseBoundary<any, any> | 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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user