mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
Fix null handling in SourceNovel.fromJson for name and path fields
This commit is contained in:
parent
ae165045eb
commit
1f27c129a5
1 changed files with 4 additions and 1 deletions
|
|
@ -80,8 +80,11 @@ class SourceNovel extends NovelItem {
|
|||
});
|
||||
|
||||
factory SourceNovel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['path'] == null) {
|
||||
throw 'path is null';
|
||||
}
|
||||
return SourceNovel(
|
||||
name: json['name'],
|
||||
name: json['name'] ?? '',
|
||||
path: json['path'],
|
||||
cover: json['cover'],
|
||||
genres: json['genres'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue