From c3294cf7dbdfb6c7761c9d1833791809abf9a112 Mon Sep 17 00:00:00 2001 From: Emiel Wit Date: Wed, 11 Dec 2024 14:06:04 +0100 Subject: [PATCH 1/2] fix: do not let the page crash when data is undefined --- src/components/actionJSForm.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/actionJSForm.js b/src/components/actionJSForm.js index 5ef46519c..ea5640014 100644 --- a/src/components/actionJSForm.js +++ b/src/components/actionJSForm.js @@ -205,9 +205,8 @@ if (error) { return Something went wrong: {error.message}; } - const { id } = data; - return ; + return ; }} ); From 2e7f2145548993d87772453fcbdf8995b19565bb Mon Sep 17 00:00:00 2001 From: Emiel Wit Date: Wed, 11 Dec 2024 14:40:02 +0100 Subject: [PATCH 2/2] fix: use tenerary statement since optional chaining is not suported --- src/components/actionJSForm.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/actionJSForm.js b/src/components/actionJSForm.js index ea5640014..3b0fd06d3 100644 --- a/src/components/actionJSForm.js +++ b/src/components/actionJSForm.js @@ -206,7 +206,8 @@ return Something went wrong: {error.message}; } - return ; + const id = data ? data.id : null; + return ; }} );