Skip to content

Commit c239cdf

Browse files
authored
remove some unnecessary code (#11759)
1 parent a226094 commit c239cdf

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/svelte/src/internal/client/dom/blocks/svelte-element.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { namespace_svg } from '../../../../constants.js';
2-
import { hydrate_anchor, hydrate_start, hydrating, set_hydrate_nodes } from '../hydration.js';
2+
import { hydrate_anchor, hydrate_start, hydrating } from '../hydration.js';
33
import { empty } from '../operations.js';
44
import {
55
block,
@@ -102,12 +102,6 @@ export function element(anchor, get_tag, is_svg, render_fn, get_namespace, locat
102102
? element.firstChild && hydrate_anchor(/** @type {Comment} */ (element.firstChild))
103103
: element.appendChild(empty());
104104

105-
if (hydrating && !element.firstChild) {
106-
// if the element is a void element with content, add an empty
107-
// node to avoid breaking assumptions elsewhere
108-
set_hydrate_nodes([empty()]);
109-
}
110-
111105
// `child_anchor` is undefined if this is a void element, but we still
112106
// need to call `render_fn` in order to run actions etc. If the element
113107
// contains children, it's a user error (which is warned on elsewhere)

0 commit comments

Comments
 (0)