Skip to content

Commit

Permalink
Anilist | 1.1.2
Browse files Browse the repository at this point in the history
- Added proper null check
  • Loading branch information
TheNetsky committed Mar 22, 2023
1 parent 93e4b3a commit b0057b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Anilist/AlSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const getDefaultStatus = async (stateManager: SourceStateManager): Promis
return (await stateManager.retrieve('defaultStatus') as string[]) ?? ['NONE']
}
export const getDefaultPrivate = async (stateManager: SourceStateManager): Promise<boolean> => {
return (await stateManager.retrieve('defaultPrivate') as boolean) ?? false
return (await stateManager.retrieve('defaultPrivate') as boolean | undefined) ?? false
}

export const trackerSettings = (stateManager: SourceStateManager): DUINavigationButton => {
Expand Down
4 changes: 2 additions & 2 deletions src/Anilist/Anilist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const AnilistInfo: SourceInfo = {
author: 'Faizan Durrani ♥ Netsky',
contentRating: ContentRating.EVERYONE,
icon: 'icon.png',
version: '1.1.1',
version: '1.1.2',
description: 'Anilist Tracker',
websiteBaseURL: 'https://anilist.co',
intents: SourceIntents.MANGA_TRACKING | SourceIntents.SETTINGS_UI
Expand Down Expand Up @@ -338,7 +338,7 @@ export class Anilist implements Searchable, MangaProgressProviding {
id: 'private',
label: 'Private',
//@ts-ignore
value: anilistManga.mediaListEntry?.private ? [anilistManga.mediaListEntry.private] : (await getDefaultPrivate(this.stateManager))
value: anilistManga.mediaListEntry?.private != undefined ? anilistManga.mediaListEntry.private : (await getDefaultPrivate(this.stateManager))
})
]
}),
Expand Down

0 comments on commit b0057b0

Please sign in to comment.