pull/10958/head
Dominic Gannaway 2 years ago
parent 32caac52c0
commit 9b75f8a3f5

@ -72,6 +72,7 @@ export function if_block(
} }
if (consequent_effect) { if (consequent_effect) {
debugger
pause_effect(consequent_effect, () => { pause_effect(consequent_effect, () => {
consequent_effect = null; consequent_effect = null;
}); });

@ -1,5 +1,5 @@
import { STATE_SYMBOL } from '../../../constants.js'; import { STATE_SYMBOL } from '../../../constants.js';
import { effect, render_effect } from '../../../reactivity/effects.js'; import { destroy_effect, effect, render_effect } from '../../../reactivity/effects.js';
import { untrack } from '../../../runtime.js'; import { untrack } from '../../../runtime.js';
/** /**
@ -43,15 +43,13 @@ export function bind_this(element_or_component, update, get_value, get_parts) {
} }
} }
}); });
});
effect(() => {
return () => { return () => {
// Defer to the next tick so that all updates can be reconciled first. if (parts && is_bound_this(get_value(...parts), element_or_component)) {
// This solves the case where one variable is shared across multiple this-bindings. update(null, ...parts);
effect(() => { }
if (parts && is_bound_this(get_value(...parts), element_or_component)) {
update(null, ...parts);
}
});
}; };
}); });
} }

Loading…
Cancel
Save