From c7daceca48345eca18ab35a5d0196098f38e419c Mon Sep 17 00:00:00 2001 From: * <*> Date: Fri, 17 Feb 2023 19:40:21 +0800 Subject: [PATCH] Match-id-6f25fe3657489f320737a4456ef62fb9abe367af --- libs/horizon/src/horizonx/devtools/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/horizon/src/horizonx/devtools/index.ts b/libs/horizon/src/horizonx/devtools/index.ts index 11818bdc..7c14a438 100644 --- a/libs/horizon/src/horizonx/devtools/index.ts +++ b/libs/horizon/src/horizonx/devtools/index.ts @@ -186,7 +186,7 @@ window.addEventListener('message', messageEvent => { } // queues store action - if (messageEvent.data.payload.type === 'horizonx queue action') { + if (messageEvent?.data?.payload?.type === 'horizonx queue action') { const data = messageEvent.data.payload.data; const store = getStore(data.storeId); if (!store?.[data.action]) return; @@ -197,7 +197,7 @@ window.addEventListener('message', messageEvent => { } // queues change store state - if (messageEvent.data.payload.type === 'horizonx change state') { + if (messageEvent?.data?.payload?.type === 'horizonx change state') { const data = messageEvent.data.payload; const store = getStore(data.storeId); if (!store) return;