From 047134d7ce2ef6d26511fd3b4ed21dbdd28d6413 Mon Sep 17 00:00:00 2001 From: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:53:44 +0530 Subject: [PATCH] fix: missing js arguments so making it optional (#31550) --- .../src/components/editorComponents/ActionCreator/helpers.tsx | 4 ++-- app/client/src/utils/JSPaneUtils.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/src/components/editorComponents/ActionCreator/helpers.tsx b/app/client/src/components/editorComponents/ActionCreator/helpers.tsx index cc1a1cdf62..d67db141bc 100644 --- a/app/client/src/components/editorComponents/ActionCreator/helpers.tsx +++ b/app/client/src/components/editorComponents/ActionCreator/helpers.tsx @@ -550,7 +550,7 @@ export function getJSOptions( jsObject.children = []; jsAction.config.actions.forEach((js: JSAction) => { - const jsArguments = js.actionConfiguration.jsArguments; + const jsArguments = js.actionConfiguration?.jsArguments; const argValue: Array = []; if (jsArguments && jsArguments.length) { @@ -596,7 +596,7 @@ export function getJSOptions( jsObject.children = []; jsModuleInstance.config.actions.forEach((js: JSAction) => { - const jsArguments = js.actionConfiguration.jsArguments; + const jsArguments = js.actionConfiguration?.jsArguments; const argValue: Array = []; if (jsArguments && jsArguments.length) { diff --git a/app/client/src/utils/JSPaneUtils.tsx b/app/client/src/utils/JSPaneUtils.tsx index 57d0693e3c..d8dccc0cff 100644 --- a/app/client/src/utils/JSPaneUtils.tsx +++ b/app/client/src/utils/JSPaneUtils.tsx @@ -43,7 +43,7 @@ export const getDifferenceInJSCollection = ( if ( preExisted.actionConfiguration.body !== action.body || !getDifferenceInJSArgumentArrays( - preExisted.actionConfiguration.jsArguments, + preExisted.actionConfiguration?.jsArguments, action.arguments, ) ) {