Skip to content

Commit 58145ae

Browse files
committed
fix: improve internal mechanism for handling process_effects
1 parent aab8dc2 commit 58145ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,8 @@ function process_effects(effect, filter_flags, shallow, collected_effects) {
653653
}
654654

655655
if (effects.length > 0) {
656+
// We might be dealing with many effects here, far more than can be spread into
657+
// an array push call (callstack overflow). So let's deal with each effect in a loop.
656658
for (var i = 0; i < effects.length; i++) {
657659
if ((filter_flags & EFFECT) !== 0) {
658660
collected_effects.push(effects[i]);

0 commit comments

Comments
 (0)