From 7b71c3836130ae3e4e4b0854397eabd7a8e1e16f Mon Sep 17 00:00:00 2001 From: lhuans <145339349+lhuans@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:16:14 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E5=BD=93=E7=94=BB?= =?UTF-8?q?=E5=B8=83=E6=B2=A1=E6=9C=89=E5=86=85=E5=AE=B9=E6=97=B6=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8F=B0=E6=8A=A5=E9=94=99=20(#26)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/canvas/src/components/render/RenderMain.js | 2 +- packages/toolbars/logo/src/Main.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/canvas/src/components/render/RenderMain.js b/packages/canvas/src/components/render/RenderMain.js index 29a7ac3..468f0e0 100644 --- a/packages/canvas/src/components/render/RenderMain.js +++ b/packages/canvas/src/components/render/RenderMain.js @@ -162,7 +162,7 @@ const setState = (data, clear) => { Object.assign(state, parseData(data, {}, getContext()) || {}) // 在状态变量合并之后,执行访问器中watchEffect,为了可以在访问器函数中可以访问其他state变量 - Object.entries(data)?.forEach(([key, stateData]) => { + Object.entries(data || {})?.forEach(([key, stateData]) => { if (isStateAccessor(stateData)) { const accessor = stateData.accessor if (accessor?.getter?.value) { diff --git a/packages/toolbars/logo/src/Main.vue b/packages/toolbars/logo/src/Main.vue index 2526b49..42313e9 100644 --- a/packages/toolbars/logo/src/Main.vue +++ b/packages/toolbars/logo/src/Main.vue @@ -76,7 +76,7 @@