diff --git a/src/routes/safe/components/Apps/index.tsx b/src/routes/safe/components/Apps/index.tsx index 9c059156..456ea9b5 100644 --- a/src/routes/safe/components/Apps/index.tsx +++ b/src/routes/safe/components/Apps/index.tsx @@ -226,9 +226,9 @@ function Apps({ closeModal, closeSnackbar, enqueueSnackbar, openModal }) { const sendMessageToIframe = useCallback( (messageId, data) => { const app = getSelectedApp() - iframeEl.contentWindow.postMessage({ messageId, data }, app.url) + iframeEl?.contentWindow.postMessage({ messageId, data }, app.url) }, - [getSelectedApp, iframeEl.contentWindow], + [getSelectedApp, iframeEl], ) // handle messages from iframe