From 58bb8271e05fbd405f1b5d6f0b1047850fb46f16 Mon Sep 17 00:00:00 2001 From: Konv Suu <2583695112@qq.com> Date: Wed, 23 Aug 2023 10:18:30 +0800 Subject: [PATCH] fix: don't rm container when container is body --- components/_util/Portal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/_util/Portal.tsx b/components/_util/Portal.tsx index 0aea311bc6..d33b2402c6 100644 --- a/components/_util/Portal.tsx +++ b/components/_util/Portal.tsx @@ -45,7 +45,7 @@ export default defineComponent({ }); }); onBeforeUnmount(() => { - if (container && container.parentNode) { + if (container && container.tagName !== 'BODY' && container.parentNode) { container.parentNode.removeChild(container); } });