From 94376f61417b02be3ea1b1afffd117e9e75283a9 Mon Sep 17 00:00:00 2001 From: Cheese <11363971+cheese-git@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:09:54 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20could=20pass=20`undefined`=20to?= =?UTF-8?q?=20Node.contains()=20(#1863)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/patchers/dynamicAppend/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sandbox/patchers/dynamicAppend/common.ts b/src/sandbox/patchers/dynamicAppend/common.ts index 969b76b..e4e1677 100644 --- a/src/sandbox/patchers/dynamicAppend/common.ts +++ b/src/sandbox/patchers/dynamicAppend/common.ts @@ -144,7 +144,7 @@ function getOverwrittenAppendChildOrInsertBefore(opts: { return function appendChildOrInsertBefore( this: HTMLHeadElement | HTMLBodyElement, newChild: T, - refChild?: Node | null, + refChild: Node | null = null, ) { let element = newChild as any; const { rawDOMAppendOrInsertBefore, isInvokedByMicroApp, containerConfigGetter } = opts;