Skip to content

Commit

Permalink
console: Check if action/event exist before checking the name
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnaIyer committed Dec 11, 2023
1 parent e8cc745 commit a14dcc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webui/console/store/middleware/logics/gateways.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a14dcc8

Please sign in to comment.