Skip to content

Commit

Permalink
fix for notdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Robonau authored and Robonau committed Sep 23, 2024
1 parent 98f7bc0 commit 4b4b891
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/simpleStores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const mangaMetaDefaults = {
doPageIndicator: false,
notes: '',
showMissingChapters: false,
groupPartials: [] as string[]
groupPartials: [] as string[] | undefined
};
type mangaMeta = typeof mangaMetaDefaults;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@
.split(',')
.map((a) => a.trim())
.filter((a) => a.length > 0);
e.currentTarget.value = $mangaMeta.groupPartials.join(',');
e.currentTarget.value =
$mangaMeta.groupPartials?.join(',') ?? '';
}}
value={$mangaMeta.groupPartials.join(',')}
value={$mangaMeta.groupPartials?.join(',') ?? ''}
class="input w-1/2"
type="text"
placeholder="asura,dex,..."
Expand Down
7 changes: 4 additions & 3 deletions src/routes/(app)/manga/[MangaID]/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ export function filterChapters(
return (
chapter: ResultOf<typeof getManga>['manga']['chapters']['nodes'][number]
) => {
if (get(mangaMeta).groupPartials.length > 0) {
const groupPartials = get(mangaMeta).groupPartials;
if (groupPartials && groupPartials.length > 0) {
if (
!get(mangaMeta)
.groupPartials.map((group) => {
!groupPartials
.map((group) => {
return chapter.scanlator
?.toLowerCase()
.includes(group.toLowerCase());
Expand Down

0 comments on commit 4b4b891

Please sign in to comment.