🐛 could pass undefined to Node.contains() (#1863)

This commit is contained in:
Cheese 2021-12-10 21:09:54 +08:00 committed by GitHub
parent ff93c6fd10
commit 94376f6141

View File

@ -144,7 +144,7 @@ function getOverwrittenAppendChildOrInsertBefore(opts: {
return function appendChildOrInsertBefore<T extends Node>(
this: HTMLHeadElement | HTMLBodyElement,
newChild: T,
refChild?: Node | null,
refChild: Node | null = null,
) {
let element = newChild as any;
const { rawDOMAppendOrInsertBefore, isInvokedByMicroApp, containerConfigGetter } = opts;