From 87f655c239e055bc884c40e25191863f7553680e Mon Sep 17 00:00:00 2001 From: Kuitos Date: Tue, 12 Jul 2022 16:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20dynamic=20head=20script=20should?= =?UTF-8?q?=20be=20append=20to=20qiankun=20head?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/patchers/dynamicAppend/common.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sandbox/patchers/dynamicAppend/common.ts b/src/sandbox/patchers/dynamicAppend/common.ts index 8879a56ed..5806133e1 100644 --- a/src/sandbox/patchers/dynamicAppend/common.ts +++ b/src/sandbox/patchers/dynamicAppend/common.ts @@ -245,7 +245,9 @@ function getOverwrittenAppendChildOrInsertBefore(opts: { return rawDOMAppendOrInsertBefore.call(this, element, refChild) as T; } - const mountDOM = appWrapperGetter(); + const appWrapper = appWrapperGetter(); + const mountDOM = target === 'head' ? getAppWrapperHeadElement(appWrapper) : appWrapper; + const { fetch } = frameworkConfiguration; const referenceNode = mountDOM.contains(refChild) ? refChild : null;