mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 15:53:30 +03:00
chore: fix filterByText function to correctly filter branches by search term
This commit is contained in:
parent
9d7ebabb84
commit
7ded6ae5b6
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user