Skip to content

Commit ce63d39

Browse files
committed
another
1 parent 6f77bd2 commit ce63d39

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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`

0 commit comments

Comments
 (0)