From 4fd7e0b42b5c86d289a5d4a81ee4b5b2574da080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Gu=CC=88ell=20Segarra?= Date: Thu, 23 Jan 2025 13:21:55 +0100 Subject: [PATCH] fix: bug where domain was null in handle open action url --- src/views/RootView.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/RootView.tsx b/src/views/RootView.tsx index d996d8b60..1fe824187 100644 --- a/src/views/RootView.tsx +++ b/src/views/RootView.tsx @@ -84,7 +84,7 @@ function RootView(props: RootViewProps, ref: any) { actionRawData.context !== null ) { parsedContext = actionRawData; - } else { + } else if (actionRawData && actionRawData.context) { parsedContext = actionRawData && parseContext({ @@ -92,6 +92,8 @@ function RootView(props: RootViewProps, ref: any) { fields: actionRawData.fields || {}, values: { ...globalValues, ...(actionRawData.values || {}) }, }); + } else { + parsedContext = {}; } const parsedDomain = await (async () => { @@ -102,7 +104,11 @@ function RootView(props: RootViewProps, ref: any) { actionRawData.domain.length > 0 ) { return actionRawData.domain; - } else if (actionRawData && !Array.isArray(actionRawData.domain)) { + } else if ( + actionRawData && + actionRawData.domain && + !Array.isArray(actionRawData.domain) + ) { return await ConnectionProvider.getHandler().evalDomain({ domain: actionRawData.domain, values: actionRawData.fields