AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(frontend): prevent NodeHandle error when array schema items is undefined (#11549)
Abhimanyu Yadavbf32a76f4904
diff --git a/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/NodeInputs.tsx b/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/NodeInputs.tsxindex e26718b18d..683a854c21 100644--- a/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/NodeInputs.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/build/components/legacy-builder/NodeInputs.tsx@@ -981,15 +981,17 @@ const NodeArrayInput: FC<{);return (<div key={entryKey}>- <NodeHandle- title={`#${index + 1}`}- className="text-sm text-gray-500"- keyName={entryKey}- schema={schema.items!}- isConnected={isConnected}- isRequired={false}- side="left"- />+ {schema.items && (+ <NodeHandle+ title={`#${index + 1}`}+ className="text-sm text-gray-500"+ keyName={entryKey}+ schema={schema.items}+ isConnected={isConnected}+ isRequired={false}+ side="left"+ />+ )}<div className="mb-2 flex space-x-2">{!isConnected &&(schema.items ? (