Skip to content

Commit b79fcd1

Browse files
committed
chore: only use append to append to the fragment
1 parent 36a3c84 commit b79fcd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/svelte/src/internal/client/dom/template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ function structure_to_fragment(structure, ns, namespace_stack = [], foreign_obje
9292
var item = structure[i];
9393
if (item == null || Array.isArray(item)) {
9494
const data = item ? item[0] : '';
95-
fragment.insertBefore(create_comment(data), null);
95+
fragment.append(create_comment(data));
9696
} else if (typeof item === 'string') {
97-
fragment.appendChild(create_text(item));
97+
fragment.append(create_text(item));
9898
continue;
9999
} else {
100100
let namespace =
@@ -134,7 +134,7 @@ function structure_to_fragment(structure, ns, namespace_stack = [], foreign_obje
134134
);
135135
}
136136
namespace_stack.pop();
137-
fragment.insertBefore(element, null);
137+
fragment.append(element);
138138
}
139139
}
140140
return fragment;

0 commit comments

Comments
 (0)