Skip to content

Commit 8aace6e

Browse files
committed
appease typescript
1 parent d268bf1 commit 8aace6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,12 @@ export function append(anchor, dom) {
163163
var current = dom;
164164

165165
if (!hydrating) {
166-
if (/** @type {Node} */ (dom).nodeType === 11) {
166+
var node = /** @type {Node} */ (dom);
167+
168+
if (node.nodeType === 11) {
167169
// if hydrating, `dom` is already an array of nodes, but if not then
168170
// we need to create an array to store it on the current effect
169-
current = /** @type {import('#client').Dom} */ ([.../** @type {Node} */ (dom).childNodes]);
171+
current = /** @type {import('#client').Dom} */ ([...node.childNodes]);
170172
}
171173

172174
// TODO ideally we'd do `anchor.before(dom)`, but that fails because `dom` can be an array of nodes in the SVG case

0 commit comments

Comments
 (0)