From c5ae0521ecefb6db960e8fb0f6b72aba476bc29d Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Tue, 13 Dec 2022 15:34:32 +0530 Subject: [PATCH] fix: Modal opening or closing type error (#18913) fix for sometimes widget not available --- app/client/src/sagas/WidgetSelectionSagas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/src/sagas/WidgetSelectionSagas.ts b/app/client/src/sagas/WidgetSelectionSagas.ts index cca32202f7..733ba1108d 100644 --- a/app/client/src/sagas/WidgetSelectionSagas.ts +++ b/app/client/src/sagas/WidgetSelectionSagas.ts @@ -419,7 +419,7 @@ function* openOrCloseModalSaga( const widget = widgetMap[action.payload.widgetId]; - if (widget.parentId) { + if (widget && widget.parentId) { const widgetInModal = modalWidgetIds.includes(widget.parentModalId); if (widgetInModal) { yield put(showModal(widget.parentModalId));