From 3a52f4c6e94831d0c06b66f979496a5b038e721c Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Thu, 16 Jan 2025 11:55:42 +0000 Subject: [PATCH] wip --- .../3-transform/client/visitors/RegularElement.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js b/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js index ffd06dfd86..41dd6d2fca 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js @@ -370,10 +370,15 @@ export function RegularElement(node, context) { if (use_text_content) { child_state.init.push( b.stmt( - b.assignment( - '=', - b.member(context.state.node, 'textContent'), - build_template_chunk(trimmed, context.visit, child_state).value + b.call( + '$.script_effect', + b.thunk( + b.assignment( + '=', + b.member(context.state.node, 'textContent'), + build_template_chunk(trimmed, context.visit, child_state).value + ) + ) ) ) );