pull/18062/merge
Rich Harris 4 months ago
parent e0f3dae6f7
commit a0fe4975ad

@ -227,7 +227,15 @@ export function pop(component) {
/** @returns {boolean} */
export function is_runes() {
return !legacy_mode_flag || (component_context !== null && component_context.l === null);
if (!legacy_mode_flag) {
return true;
}
// TODO feels like we could probably simplify this a bit. no tests fail without
// the first part, though would like to better understand usage before deleting
const context = component_context ?? active_reaction?.ctx ?? active_effect?.ctx;
return context?.l === null;
}
/**

@ -7,7 +7,6 @@ import { is } from '../../../proxy.js';
import { queue_micro_task } from '../../task.js';
import { hydrating } from '../../hydration.js';
import { tick, untrack } from '../../../runtime.js';
import { is_runes } from '../../../context.js';
import { current_batch, previous_batch } from '../../../reactivity/batch.js';
import { async_mode_flag } from '../../../../flags/index.js';

Loading…
Cancel
Save