|
|
|
|
@ -40,7 +40,7 @@ import { DEV } from 'esm-env';
|
|
|
|
|
import { define_property } from '../../shared/utils.js';
|
|
|
|
|
import { get_next_sibling } from '../dom/operations.js';
|
|
|
|
|
import { component_context, dev_current_component_function, dev_stack } from '../context.js';
|
|
|
|
|
import { Batch, schedule_effect } from './batch.js';
|
|
|
|
|
import { Batch, current_effects, schedule_effect } from './batch.js';
|
|
|
|
|
import { flatten, increment_pending } from './async.js';
|
|
|
|
|
import { without_reactive_context } from '../dom/elements/bindings/shared.js';
|
|
|
|
|
import { set_signal_status } from './status.js';
|
|
|
|
|
@ -127,8 +127,12 @@ function create_effect(type, fn, sync) {
|
|
|
|
|
throw e;
|
|
|
|
|
}
|
|
|
|
|
} else if (fn !== null) {
|
|
|
|
|
Batch.ensure();
|
|
|
|
|
schedule_effect(effect);
|
|
|
|
|
if (current_effects !== null) {
|
|
|
|
|
current_effects.push(effect);
|
|
|
|
|
} else {
|
|
|
|
|
Batch.ensure();
|
|
|
|
|
schedule_effect(effect);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** @type {Effect | null} */
|
|
|
|
|
|