Skip to content

Commit 03f1661

Browse files
fix: update_branch with (anchor).data possible undefined
1 parent 1c2fc21 commit 03f1661

File tree

1 file changed

+1
-0
lines changed
  • packages/svelte/src/internal/client/dom/blocks

1 file changed

+1
-0
lines changed

packages/svelte/src/internal/client/dom/blocks/if.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export function if_block(node, fn, [root_index, hydrate_index] = [0, 0]) {
5757
if (hydrating && hydrate_index !== -1) {
5858
if (root_index === 0) {
5959
const data = /** @type {Comment} */ (anchor).data;
60+
if (!data) return;
6061
if (data === HYDRATION_START) {
6162
hydrate_index = 0;
6263
} else if (data === HYDRATION_START_ELSE) {

0 commit comments

Comments
 (0)