Fix white screen if the manga doesn't have genre.

This commit is contained in:
Arias800 2021-04-10 19:42:05 +02:00 committed by GitHub
parent 309803368b
commit b884d34bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,6 +135,9 @@ export default function MangaDetails(props: IProps) {
const { setAction } = useContext(NavbarContext);
const { manga } = props;
if (manga.genre == null) {
manga.genre = '';
}
const [inLibrary, setInLibrary] = useState<string>(
manga.inLibrary ? 'In Library' : 'Add To Library',
);