Skip to content

Commit

Permalink
fix: add multiple selector null check (#3392)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Dec 13, 2024
1 parent 41a8536 commit b7eb4c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ export const MultipleRowArraySelect = ({

const [navigationPath, setNavigationPath] = useState<string[]>([]);

// Make sure the value is an array of arrays
const formatValue = useMemo(() => {
return Array.isArray(value) ? value : [];
return Array.isArray(value) ? value.filter((v) => Array.isArray(v)) : [];
}, [value]);

// Close when clicking outside
Expand Down
2 changes: 1 addition & 1 deletion projects/app/src/web/core/workflow/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ export const filterWorkflowNodeOutputsByType = (
valueType === WorkflowIOValueTypeEnum.arrayAny ||
!output.valueType ||
output.valueType === WorkflowIOValueTypeEnum.any ||
validTypeMap[valueType].includes(output.valueType)
validTypeMap[valueType]?.includes(output.valueType)
);
};

Expand Down

0 comments on commit b7eb4c1

Please sign in to comment.