Skip to content

Commit

Permalink
fix: adjust heuristics for effect_update_depth_exceeded (#11558)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
trueadm committed May 11, 2024
1 parent 18f61a5 commit a3702e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-avocados-fetch.md
@@ -0,0 +1,5 @@
---
"svelte": patch
---

fix: further adjust heuristics for effect_update_depth_exceeded
2 changes: 2 additions & 0 deletions packages/svelte/src/internal/client/runtime.js
Expand Up @@ -515,6 +515,7 @@ function infinite_loop_guard() {
* @returns {void}
*/
function flush_queued_root_effects(root_effects) {
infinite_loop_guard();
for (var i = 0; i < root_effects.length; i++) {
var signal = root_effects[i];
flush_nested_effects(signal, RENDER_EFFECT | EFFECT);
Expand Down Expand Up @@ -701,6 +702,7 @@ function flush_nested_effects(effect, filter_flags, shallow = false) {
* @returns {void}
*/
export function flush_local_render_effects(effect) {
infinite_loop_guard();
// We are entering a new flush sequence, so ensure counter is reset.
flush_count = 0;
flush_nested_effects(effect, RENDER_EFFECT, true);
Expand Down

0 comments on commit a3702e8

Please sign in to comment.