We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
System.queuedEffects
1 parent 2e3df7e commit 89c5e8fCopy full SHA for 89c5e8f
1 file changed
src/system.ts
@@ -58,17 +58,19 @@ export function endBatch(): void {
58
}
59
60
export function drainQueuedEffects(): void {
61
- while (System.queuedEffects !== undefined) {
62
- const effect = System.queuedEffects;
63
- const queuedNext = System.queuedEffects.nextNotify;
+ let effect = System.queuedEffects;
+ while (effect !== undefined) {
+ const queuedNext = effect.nextNotify;
64
if (queuedNext !== undefined) {
65
- System.queuedEffects.nextNotify = undefined;
66
- System.queuedEffects = queuedNext;
+ effect.nextNotify = undefined;
+ effect.notify();
67
+ effect = queuedNext;
68
} else {
69
System.queuedEffects = undefined;
70
System.queuedEffectsTail = undefined;
71
72
+ effect = System.queuedEffects;
73
- effect.notify();
74
75
76
0 commit comments