pull/16208/head
7nik 3 months ago
parent fe7ca9b001
commit 77e4e224c2

@ -30,4 +30,4 @@ export const PROXY_PATH_SYMBOL = Symbol('proxy path');
export const ELEMENT_NODE = 1; export const ELEMENT_NODE = 1;
export const TEXT_NODE = 3; export const TEXT_NODE = 3;
export const COMMENT_NODE = 8; export const COMMENT_NODE = 8;
export const DOCUMENT_FRAGMENT_NODE = 11; export const DOCUMENT_FRAGMENT_NODE = 11;

@ -68,7 +68,10 @@ export function html(node, get_value, svg = false, mathml = false, skip_warning
var next = hydrate_next(); var next = hydrate_next();
var last = next; var last = next;
while (next !== null && (next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')) { while (
next !== null &&
(next.nodeType !== COMMENT_NODE || /** @type {Comment} */ (next).data !== '')
) {
last = next; last = next;
next = /** @type {TemplateNode} */ (get_next_sibling(next)); next = /** @type {TemplateNode} */ (get_next_sibling(next));
} }

@ -37,7 +37,8 @@ export function head(render_fn) {
while ( while (
head_anchor !== null && head_anchor !== null &&
(head_anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */ (head_anchor).data !== HYDRATION_START) (head_anchor.nodeType !== COMMENT_NODE ||
/** @type {Comment} */ (head_anchor).data !== HYDRATION_START)
) { ) {
head_anchor = /** @type {TemplateNode} */ (get_next_sibling(head_anchor)); head_anchor = /** @type {TemplateNode} */ (get_next_sibling(head_anchor));
} }

Loading…
Cancel
Save