Skip to content

Commit f8c6f8c

Browse files
authored
refactor(runtime-dom): insertBefore anchor null equals appendChild (#1463)
1 parent 82b28a5 commit f8c6f8c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Diff for: packages/runtime-dom/src/nodeOps.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ let tempSVGContainer: SVGElement
99

1010
export const nodeOps: Omit<RendererOptions<Node, Element>, 'patchProp'> = {
1111
insert: (child, parent, anchor) => {
12-
if (anchor) {
13-
parent.insertBefore(child, anchor)
14-
} else {
15-
parent.appendChild(child)
16-
}
12+
parent.insertBefore(child, anchor || null)
1713
},
1814

1915
remove: child => {

0 commit comments

Comments
 (0)