pull/9648/head
Rich Harris 3 years ago
parent d86251cdb9
commit 697748420f

@ -1542,7 +1542,7 @@ function swap_block_dom(block, from, to) {
/** /**
* @param {Comment} anchor_node * @param {Comment} anchor_node
* @param {() => string} tag_fn * @param {() => string} tag_fn
* @param {null | ((element: Element, anchor: Node) => void)} render_fn * @param {undefined | ((element: Element, anchor: Node) => void)} render_fn
* @param {any} is_svg * @param {any} is_svg
* @returns {void} * @returns {void}
*/ */
@ -1582,7 +1582,7 @@ export function element(anchor_node, tag_fn, render_fn, is_svg = false) {
block.d = null; block.d = null;
} }
element = next_element; element = next_element;
if (element !== null && render_fn !== null) { if (element !== null && render_fn !== undefined) {
let anchor; let anchor;
if (current_hydration_fragment !== null) { if (current_hydration_fragment !== null) {
// Use the existing ssr comment as the anchor so that the inner open and close // Use the existing ssr comment as the anchor so that the inner open and close

@ -1,4 +1,4 @@
// index.svelte (Svelte v5.0.0-next.13) // index.svelte (Svelte VERSION)
// Note: compiler output will change before 5.0 is released! // Note: compiler output will change before 5.0 is released!
import "svelte/internal/disclose-version"; import "svelte/internal/disclose-version";
import * as $ from "svelte/internal"; import * as $ from "svelte/internal";
@ -14,4 +14,4 @@ export default function Svelte_element($$anchor, $$props) {
$.element(node, () => $.get(tag)); $.element(node, () => $.get(tag));
$.close_frag($$anchor, fragment); $.close_frag($$anchor, fragment);
$.pop(); $.pop();
} }

@ -1,4 +1,4 @@
// index.svelte (Svelte v5.0.0-next.13) // index.svelte (Svelte VERSION)
// Note: compiler output will change before 5.0 is released! // Note: compiler output will change before 5.0 is released!
import * as $ from "svelte/internal/server"; import * as $ from "svelte/internal/server";
@ -24,4 +24,4 @@ export default function Svelte_element($$payload, $$props) {
$$payload.out += `${anchor}`; $$payload.out += `${anchor}`;
$.bind_props($$props, { tag }); $.bind_props($$props, { tag });
$.pop(); $.pop();
} }

Loading…
Cancel
Save