async-fork
Dominic Gannaway 7 months ago
parent 5796edf113
commit bfa2f3bc52

@ -153,7 +153,6 @@ export function set(source, value) {
!untracking && !untracking &&
is_runes() && is_runes() &&
(active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 && (active_reaction.f & (DERIVED | BLOCK_EFFECT)) !== 0 &&
(active_reaction.f & (ASYNC_DERIVED)) === 0 &&
// If the source was created locally within the current derived, then // If the source was created locally within the current derived, then
// we allow the mutation. // we allow the mutation.
(derived_sources === null || !derived_sources.includes(source)) (derived_sources === null || !derived_sources.includes(source))

@ -37,6 +37,8 @@ export default test({
assert.equal(target.querySelector('h1'), h1); assert.equal(target.querySelector('h1'), h1);
d = deferred(); d = deferred();
// TODO context leaks without this?
await Promise.resolve();
component.promise = d.promise; component.promise = d.promise;
await tick(); await tick();
assert.htmlEqual(target.innerHTML, '<h1>hello</h1>'); assert.htmlEqual(target.innerHTML, '<h1>hello</h1>');

Loading…
Cancel
Save