pull/10958/head
Dominic Gannaway 7 months ago
parent 32caac52c0
commit 9b75f8a3f5

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

@ -1,5 +1,5 @@
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';
/**
@ -43,15 +43,13 @@ export function bind_this(element_or_component, update, get_value, get_parts) {
}
}
});
});
effect(() => {
return () => {
// Defer to the next tick so that all updates can be reconciled first.
// This solves the case where one variable is shared across multiple this-bindings.
effect(() => {
if (parts && is_bound_this(get_value(...parts), element_or_component)) {
update(null, ...parts);
}
});
if (parts && is_bound_this(get_value(...parts), element_or_component)) {
update(null, ...parts);
}
};
});
}

Loading…
Cancel
Save