Skip to content

Commit

Permalink
fix(libraryStates): filters only working with all lower case text
Browse files Browse the repository at this point in the history
fixes #309. This commit makes the filtering logic more "forgiving".
  • Loading branch information
ericorruption authored and xgi committed Oct 12, 2023
1 parent b948591 commit f5d80eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/state/libraryStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ export const sortedFilteredChapterListState = selector<Chapter[]>({
(chapter: Chapter) =>
(chapterLanguages.includes(chapter.languageKey) || chapterLanguages.length === 0) &&
chapter.title !== null &&
chapter.title.toLowerCase().includes(chapterFilterTitle) &&
chapter.title.toLowerCase().includes(chapterFilterTitle.toLowerCase()) &&
chapter.groupName !== null &&
chapter.groupName.toLowerCase().includes(chapterFilterGroup)
chapter.groupName.toLowerCase().includes(chapterFilterGroup.toLowerCase())
)
.sort((a, b) => {
const volumeComp = {
Expand Down

0 comments on commit f5d80eb

Please sign in to comment.