refactor(runtime-dom): insertBefore anchor null equals appendChild (#1463)
This commit is contained in:
parent
82b28a5ecb
commit
f8c6f8c7b5
@ -9,11 +9,7 @@ let tempSVGContainer: SVGElement
|
|||||||
|
|
||||||
export const nodeOps: Omit<RendererOptions<Node, Element>, 'patchProp'> = {
|
export const nodeOps: Omit<RendererOptions<Node, Element>, 'patchProp'> = {
|
||||||
insert: (child, parent, anchor) => {
|
insert: (child, parent, anchor) => {
|
||||||
if (anchor) {
|
parent.insertBefore(child, anchor || null)
|
||||||
parent.insertBefore(child, anchor)
|
|
||||||
} else {
|
|
||||||
parent.appendChild(child)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
remove: child => {
|
remove: child => {
|
||||||
|
Loading…
Reference in New Issue
Block a user