pull/15844/head
Rich Harris 2 months ago
parent 16f960eba7
commit 99fa11b4fc

@ -175,8 +175,8 @@ export function pop(component) {
if (effects !== null) {
context.e = null;
for (var effect of effects) {
create_user_effect(effect.fn);
for (var fn of effects) {
create_user_effect(fn);
}
}

@ -200,11 +200,7 @@ export function user_effect(fn) {
if (defer) {
var context = /** @type {ComponentContext} */ (component_context);
(context.e ??= []).push({
fn,
effect: active_effect,
reaction: active_reaction
});
(context.e ??= []).push(fn);
} else {
return create_user_effect(fn);
}

@ -15,11 +15,7 @@ export type ComponentContext = {
/** context */
c: null | Map<unknown, unknown>;
/** deferred effects */
e: null | Array<{
fn: () => void | (() => void);
effect: null | Effect;
reaction: null | Reaction;
}>;
e: null | Array<() => void | (() => void)>;
/** mounted */
m: boolean;
/**

Loading…
Cancel
Save