Skip to content

Commit

Permalink
Merge pull request #112 from mbret/develop
Browse files Browse the repository at this point in the history
fix: oupsie
  • Loading branch information
mbret authored Mar 16, 2024
2 parents fdaef72 + 0da7334 commit cda3e67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/collections/states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export const useCollectionsWithPrivacy = ({
data: collections?.filter((collection) => {
if (showCollectionWithProtectedContent === "unlocked") {
const hasSomeNonVisibleBook = collection.books.some(
(bookId) => !visibleBookIds.includes(bookId)
(bookId) => !visibleBookIds?.includes(bookId)
)

return !hasSomeNonVisibleBook
} else {
const hasSomeVisibleBook = collection?.books.some((bookId) =>
visibleBookIds.includes(bookId)
visibleBookIds?.includes(bookId)
)
return hasSomeVisibleBook || collection?.books.length === 0
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/settings/ManageStorageScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const ManageStorageScreen = () => {
const extraDownloadFilesIds = difference(downloadedBookIds, bookIds)
const theme = useTheme()
const bookIdsToDisplay = useMemo(
() => bookIds.filter((id) => visibleBookIds.includes(id)),
() => bookIds.filter((id) => visibleBookIds?.includes(id)),
[bookIds, visibleBookIds]
)
const { mutate: onDeleteAllDownloadsClick } = useMutation({
Expand Down

0 comments on commit cda3e67

Please sign in to comment.