Fix typing

This commit is contained in:
Yihao Wang
2025-07-14 19:14:20 +12:00
parent 911057d560
commit afc61e6f4c

View File

@@ -82,9 +82,13 @@ export default function Hero() {
const displayedTools =
bookmarkedToolPaths.length > 0
? bookmarkedToolPaths
.map((path) => toolsMap.get(path))
.filter((tools) => tools != undefined)
? bookmarkedToolPaths.flatMap((path) => {
const tool = toolsMap.get(path);
if (tool === undefined) {
return [];
}
return [tool];
})
: exampleTools;
return (