mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
fix: Load patches from older versions of ReVanced Manager correctly
This commit is contained in:
parent
38a2fa55df
commit
6ad0d860c7
@ -12,7 +12,15 @@ class Patch {
|
||||
required this.options,
|
||||
});
|
||||
|
||||
factory Patch.fromJson(Map<String, dynamic> json) => _$PatchFromJson(json);
|
||||
factory Patch.fromJson(Map<String, dynamic> json) {
|
||||
// See: https://github.com/ReVanced/revanced-manager/issues/1364#issuecomment-1760414618
|
||||
if (json['options'] == null) {
|
||||
json['options'] = [];
|
||||
}
|
||||
|
||||
return _$PatchFromJson(json);
|
||||
}
|
||||
|
||||
final String name;
|
||||
final String? description;
|
||||
final bool excluded;
|
||||
|
Loading…
Reference in New Issue
Block a user