File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/svelte/src/compiler/phases/3-transform/client/visitors Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -377,10 +377,11 @@ export function RegularElement(node, context) {
377377
378378 // If `hydrate_node` is set inside the element, we need to reset it
379379 // after the element has been hydrated (we don't need to reset if it's been inlined)
380- let needs_reset =
381- trimmed . some ( ( node ) => node . type !== 'Text' ) &&
382- ( ! trimmed . every ( ( node ) => node . type === 'Text' || node . type === 'ExpressionTag' ) ||
383- ! is_inlinable_sequence ( trimmed ) ) ;
380+ let needs_reset = ! trimmed . every (
381+ ( node ) =>
382+ node . type === 'Text' ||
383+ ( node . type === 'ExpressionTag' && node . metadata . expression . can_inline )
384+ ) ;
384385
385386 // The same applies if it's a `<template>` element, since we need to
386387 // set the value of `hydrate_node` to `node.content`
You can’t perform that action at this time.
0 commit comments