fix: update_branch with (anchor).data possible undefined

pull/15851/head
Matteo Battista 5 months ago committed by GitHub
parent 1c2fc21023
commit 03f1661176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -57,6 +57,7 @@ export function if_block(node, fn, [root_index, hydrate_index] = [0, 0]) {
if (hydrating && hydrate_index !== -1) { if (hydrating && hydrate_index !== -1) {
if (root_index === 0) { if (root_index === 0) {
const data = /** @type {Comment} */ (anchor).data; const data = /** @type {Comment} */ (anchor).data;
if (!data) return;
if (data === HYDRATION_START) { if (data === HYDRATION_START) {
hydrate_index = 0; hydrate_index = 0;
} else if (data === HYDRATION_START_ELSE) { } else if (data === HYDRATION_START_ELSE) {

Loading…
Cancel
Save