stringified_text -> expression

pull/15041/head
Rich Harris 2 years ago
parent e2350578ca
commit ffbe368f28

@ -48,7 +48,7 @@ export function build_template_chunk(values, visit, state) {
}
} else {
if (node.metadata.expression.has_call && contains_multiple_call_expression) {
const id = b.id(state.scope.generate('stringified_text'));
const id = b.id(state.scope.generate('expression'));
state.init.push(
b.const(
id,

@ -16,11 +16,11 @@ export default function Text_nodes_deriveds($$anchor) {
}
var p = root();
const stringified_text = $.derived(() => text1() ?? '');
const stringified_text_1 = $.derived(() => text2() ?? '');
const expression = $.derived(() => text1() ?? '');
const expression_1 = $.derived(() => text2() ?? '');
var text = $.child(p);
$.template_effect(() => $.set_text(text, `${$.get(stringified_text)}${$.get(stringified_text_1)}`));
$.template_effect(() => $.set_text(text, `${$.get(expression)}${$.get(expression_1)}`));
$.reset(p);
$.append($$anchor, p);
}
Loading…
Cancel
Save