[PublicRoomEntry] Fix fromJson

This commit is contained in:
Christian Pauly 2020-02-22 18:13:13 +00:00
parent 665f69ff46
commit f4be2aa023

View file

@ -55,7 +55,8 @@ class PublicRoomEntry {
});
PublicRoomEntry.fromJson(Map<String, dynamic> json, Client client)
: aliases = json['aliases'].cast<String>(),
: aliases =
json.containsKey('aliases') ? json['aliases'].cast<String>() : [],
avatarUrl = json['avatar_url'],
guestCanJoin = json['guest_can_join'],
name = json['name'],