From de981b63add8fe35c333e34e7b7b2c0f4ee92600 Mon Sep 17 00:00:00 2001 From: sdess09 <37374498+sdess09@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:08:16 -0400 Subject: [PATCH] Resource List hotfix (#3923) --- .../porter-form/field-components/ResourceList.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/components/porter-form/field-components/ResourceList.tsx b/dashboard/src/components/porter-form/field-components/ResourceList.tsx index d1217dc2f4..cc542e99c9 100644 --- a/dashboard/src/components/porter-form/field-components/ResourceList.tsx +++ b/dashboard/src/components/porter-form/field-components/ResourceList.tsx @@ -31,7 +31,7 @@ const ResourceList: React.FC = (props) => { !formState?.variables?.currentChart?.name || !formState?.variables?.namespace ) { - return () => {}; + return () => { }; } let { group, version, resource } = props.context.config; @@ -50,7 +50,7 @@ const ResourceList: React.FC = (props) => { // attempt to find a corresponding name and label in the current array let foundMatch = false; - resourceList.forEach((resource, index) => { + Array.isArray(resourceList) && resourceList?.forEach((resource, index) => { if (resource.name == name && resource.label == label) { foundMatch = true; @@ -92,7 +92,7 @@ const ResourceList: React.FC = (props) => { return ( - {resourceList?.map((resource: any, i: number) => { + {Array.isArray(resourceList) && resourceList?.map((resource: any, i: number) => { if (resource.data) { return (