fix: resolve TypeScript iterator error in OutfitRecommendationTool

- Fixed type error where response.recommendations could be undefined
- Added null coalescing operator to ensure safe array spreading
- Updated OutfitRecommendationCard and capabilities configuration
This commit is contained in:
imeepos
2025-07-28 11:56:11 +08:00
parent 2f845db6ac
commit 5c019b48df
3 changed files with 2 additions and 9 deletions

View File

@@ -142,7 +142,7 @@ const OutfitRecommendationTool: React.FC = () => {
if (group.group_id === groupId) {
return {
...group,
children: [...group.children, ...response.recommendations]
children: [...group.children, ...(response.recommendations || [])]
};
}
return group;