pull/17038/head
Rich Harris 1 week ago
parent 9c3b79637b
commit 14851b4d90

@ -23,6 +23,6 @@ export function DebugTag(node, context) {
const call = b.call('console.log', object);
context.state.init.push(
b.stmt(b.call('$.template_effect', b.thunk(b.block([b.stmt(call), b.debugger]))))
b.stmt(b.call('$.template_effect', b.array([]), b.thunk(b.block([b.stmt(call), b.debugger]))))
);
}

@ -5,6 +5,7 @@ import { build_getter, is_prop_source } from '../utils.js';
import * as b from '#compiler/builders';
import { add_state_transformers } from './shared/declarations.js';
import { get_rune } from '../../../scope.js';
import { runes } from '../../../../state.js';
/**
* @param {Program} node
@ -139,7 +140,7 @@ export function Program(node, context) {
add_state_transformers(context);
if (context.state.is_instance) {
if (context.state.is_instance && runes) {
return {
...node,
body: transform_body(node, context)

@ -476,6 +476,7 @@ function setup_select_synchronization(value_binding, context) {
b.stmt(
b.call(
'$.template_effect',
b.array([]),
b.thunk(
b.block([b.stmt(/** @type {Expression} */ (context.visit(bound))), b.stmt(invalidator)])
)
@ -654,7 +655,7 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
// this is different from other updates — it doesn't get grouped,
// because set_custom_element_data may not be idempotent
const update = has_state ? b.call('$.template_effect', b.thunk(call)) : call;
const update = has_state ? b.call('$.template_effect', b.array([]), b.thunk(call)) : call;
context.state.init.push(b.stmt(update));
}

Loading…
Cancel
Save