Skip to content

Commit a3702e8

Browse files
authored
fix: adjust heuristics for effect_update_depth_exceeded (#11558)
* fix: adjust heuristics for effect_update_depth_exceeded * fix: adjust heuristics for effect_update_depth_exceeded * fix: further adjust heuristics for effect_update_depth_exceeded
1 parent 18f61a5 commit a3702e8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/grumpy-avocados-fetch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: further adjust heuristics for effect_update_depth_exceeded

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ function infinite_loop_guard() {
515515
* @returns {void}
516516
*/
517517
function flush_queued_root_effects(root_effects) {
518+
infinite_loop_guard();
518519
for (var i = 0; i < root_effects.length; i++) {
519520
var signal = root_effects[i];
520521
flush_nested_effects(signal, RENDER_EFFECT | EFFECT);
@@ -701,6 +702,7 @@ function flush_nested_effects(effect, filter_flags, shallow = false) {
701702
* @returns {void}
702703
*/
703704
export function flush_local_render_effects(effect) {
705+
infinite_loop_guard();
704706
// We are entering a new flush sequence, so ensure counter is reset.
705707
flush_count = 0;
706708
flush_nested_effects(effect, RENDER_EFFECT, true);

0 commit comments

Comments
 (0)