fix toDouble was called on null when you had a pinned room

This commit is contained in:
Jayesh Nirve 2021-08-13 18:35:46 +05:30
parent 0b531d3e99
commit 2e7bf1a5c9
No known key found for this signature in database
GPG Key ID: E9F26B1FCEB549BD
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ class Room {
static Tag _tryTagFromJson(Object o) { static Tag _tryTagFromJson(Object o) {
if (o is Map<String, dynamic>) { if (o is Map<String, dynamic>) {
return Tag( return Tag(
order: o.tryGet<num>('order').toDouble(), order: o?.tryGet<num>('order')?.toDouble(),
additionalProperties: Map.from(o)..remove('order')); additionalProperties: Map.from(o)..remove('order'));
} }
return Tag(); return Tag();