Skip to content

Commit 3c21c6e

Browse files
committed
feat: remount when html element updated
1 parent 39ed838 commit 3c21c6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/xtensio/src/loaders/importReactLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const getLinkTag = () => {
3737
const __mObserver = new MutationObserver((mutationsList, observer)=> {
3838
for (const mutation of mutationsList) {
3939
if (mutation.type === 'childList') {
40+
if(mutation.target?.parentElement?.tagName === "HTML" && !document.querySelector("${appName}")) __mount();
4041
mutation.addedNodes.forEach((node) => {
4142
if (/(${appName}-mount)/i.test(node.nodeName)) {
4243
const shadowEl = node.querySelector("[shadow-root='${appName}-mount']");

0 commit comments

Comments
 (0)