From 6ab34a09969d8af80644a8e44b67a2be5dbc266c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Wed, 1 Jun 2022 22:14:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BC=9A=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/preview/hooks/useComInstall.hook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/preview/hooks/useComInstall.hook.ts b/src/views/preview/hooks/useComInstall.hook.ts index 4ce45576..f25064dc 100644 --- a/src/views/preview/hooks/useComInstall.hook.ts +++ b/src/views/preview/hooks/useComInstall.hook.ts @@ -8,7 +8,7 @@ export const useComInstall = (localStorageInfo: ChartEditStorageType) => { // 注册组件(一开始无法获取window['$vue']) const intervalTiming = setInterval(() => { - if (window['$vue'].component) { + if (window['$vue']?.component) { clearInterval(intervalTiming) localStorageInfo.componentList.forEach(async (e: CreateComponentType) => { if (!window['$vue'].component(e.chartConfig.chartKey)) {