mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-30 17:38:17 -05:00
fix: handle empty input_schema.properties in CustomNode
Add defensive check to prevent crash when inputSchema.properties is undefined (e.g., for sub-agent blocks with empty schemas).
This commit is contained in:
@@ -857,7 +857,7 @@ export const CustomNode = React.memo(
|
||||
})();
|
||||
|
||||
const hasAdvancedFields =
|
||||
data.inputSchema &&
|
||||
data.inputSchema?.properties &&
|
||||
Object.entries(data.inputSchema.properties).some(([key, value]) => {
|
||||
return (
|
||||
value.advanced === true && !data.inputSchema.required?.includes(key)
|
||||
|
||||
Reference in New Issue
Block a user