aa-coordination
Rich Harris 8 months ago
parent 2e49f7ce1e
commit af2224ebb3

@ -23,9 +23,8 @@ export const HEAD_EFFECT = 1 << 20;
export const EFFECT_HAS_DERIVED = 1 << 21;
// Flags used for async
export const IS_ASYNC = 1 << 22;
export const REACTION_IS_UPDATING = 1 << 23;
export const BOUNDARY_SUSPENDED = 1 << 24;
export const REACTION_IS_UPDATING = 1 << 22;
export const BOUNDARY_SUSPENDED = 1 << 23;
export const STATE_SYMBOL = Symbol('$state');
export const STATE_SYMBOL_METADATA = Symbol('$state metadata');

@ -6,7 +6,6 @@ import {
DESTROYED,
DIRTY,
EFFECT_HAS_DERIVED,
IS_ASYNC,
MAYBE_DIRTY,
UNOWNED
} from '../constants.js';
@ -114,7 +113,7 @@ export function async_derived(fn) {
// TODO we should probably null out active effect here,
// rather than inside `restore()`
}
}, IS_ASYNC);
});
return Promise.resolve(promise).then(() => value);
}

@ -36,7 +36,6 @@ import {
MAYBE_DIRTY,
EFFECT_HAS_DERIVED,
BOUNDARY_EFFECT,
IS_ASYNC,
TEMPLATE_EFFECT
} from '../constants.js';
import { set } from './sources.js';
@ -149,7 +148,7 @@ function create_effect(type, fn, sync, push = true) {
effect.first === null &&
effect.nodes_start === null &&
effect.teardown === null &&
(effect.f & (EFFECT_HAS_DERIVED | BOUNDARY_EFFECT | IS_ASYNC)) === 0;
(effect.f & (EFFECT_HAS_DERIVED | BOUNDARY_EFFECT)) === 0;
if (!inert && !is_root && push) {
if (parent_effect !== null) {

Loading…
Cancel
Save