chore: fix filterByText function to correctly filter branches by search term

This commit is contained in:
Mattias Granlund 2024-01-27 13:29:08 +01:00
parent 9d7ebabb84
commit 7ded6ae5b6

View File

@ -58,7 +58,7 @@
hideBots
});
const filteredBySearch = filterByText(filteredByType, search);
return hideInactive ? filterInactive(filteredBySearch) : filteredByType;
return hideInactive ? filterInactive(filteredBySearch) : filteredBySearch;
}
);
@ -88,6 +88,7 @@
}
function filterByText(branches: CombinedBranch[], search: string | undefined) {
console.log(search);
if (search == undefined) return branches;
return branches.filter((b) => b.displayName.includes(search));
}