Skip to content

Commit 31c6a79

Browse files
committed
this condition is always true
1 parent 9b7331c commit 31c6a79

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/svelte/src/internal/client/dom/template.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,10 @@ function open_template(is_fragment, use_clone_node, anchor, template_element_fn)
9292
if (anchor !== null) {
9393
hydrate_block_anchor(anchor);
9494
}
95-
// In ssr+hydration optimization mode, we might remove the template_element,
96-
// so we need to is_fragment flag to properly handle hydrated content accordingly.
97-
const nodes = hydrate_nodes;
98-
if (nodes !== null) {
99-
return is_fragment ? nodes : /** @type {Element} */ (nodes[0]);
100-
}
95+
96+
return is_fragment ? hydrate_nodes : /** @type {Element} */ (hydrate_nodes[0]);
10197
}
98+
10299
return use_clone_node
103100
? clone_node(/** @type {() => Element} */ (template_element_fn)(), true)
104101
: document.importNode(/** @type {() => Element} */ (template_element_fn)(), true);

0 commit comments

Comments
 (0)