From a14dcc8ebefb2278295678105b1f4c321e9b6d2c Mon Sep 17 00:00:00 2001 From: Krishna Iyer Easwaran Date: Mon, 11 Dec 2023 12:32:45 +0100 Subject: [PATCH] console: Check if action/event exist before checking the name --- pkg/webui/console/store/middleware/logics/gateways.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webui/console/store/middleware/logics/gateways.js b/pkg/webui/console/store/middleware/logics/gateways.js index bc6c756499..b8665e391a 100644 --- a/pkg/webui/console/store/middleware/logics/gateways.js +++ b/pkg/webui/console/store/middleware/logics/gateways.js @@ -252,7 +252,7 @@ const updateGatewayStatisticsLogic = createRequestLogic({ const getGatewayEventLocationLogic = createLogic({ type: gateways.GET_GTW_EVENT_MESSAGE_SUCCESS, validate: ({ action }, allow, reject) => { - if (action.event.name !== 'gs.status.receive' || !action?.event?.data?.antenna_locations) { + if (action?.event?.name !== 'gs.status.receive' || !action?.event?.data?.antenna_locations) { reject(action) } else { allow(action)