Skip to content

Commit 0bbdc1b

Browse files
committed
chore: fix tools list
1 parent 0da6ea6 commit 0bbdc1b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/webviews/Tools.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,11 @@ export const Tools = () => {
308308
const trackedConfigQuery = useQuery(trackedConfigsQueryOptions);
309309
const configs = trackedConfigQuery.data || [];
310310

311-
if (!selectedTool) {
312-
return null;
313-
}
314-
315-
const configsWithTool = configs.filter((config) => {
316-
return Object.keys(config.tools).includes(selectedTool.name);
317-
});
311+
const configsWithTool = selectedTool
312+
? configs.filter((config) => {
313+
return Object.keys(config.tools).includes(selectedTool.name);
314+
})
315+
: [];
318316

319317
const outdatedToolsQuery = useQuery({
320318
queryKey: ["outdatedTools"],

0 commit comments

Comments
 (0)