Skip to content

Commit 04415e9

Browse files
committed
tweak
1 parent f5460e2 commit 04415e9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@ export function set_hydrate_nodes(start) {
3131
* @returns {Node}
3232
*/
3333
export function hydrate_anchor(node) {
34-
if (node.nodeType !== 8) {
35-
return node;
36-
}
37-
3834
// TODO this could have false positives, if a user comment consisted of `[`. need to tighten that up
39-
if (/** @type {Comment} */ (node).data !== HYDRATION_START) {
35+
if (node.nodeType !== 8 || /** @type {Comment} */ (node).data !== HYDRATION_START) {
4036
return node;
4137
}
4238

@@ -62,7 +58,7 @@ export function hydrate_anchor(node) {
6258
}
6359
}
6460

65-
current = current.nextSibling;
61+
current = /** @type {import('#client').TemplateNode} */ (current.nextSibling);
6662
}
6763

6864
let location;

0 commit comments

Comments
 (0)