fix canonical alias sometimes being null
This commit is contained in:
parent
3975bcaea5
commit
7ed6dcce67
|
@ -367,7 +367,8 @@ class Room {
|
|||
}
|
||||
|
||||
/// The address in the format: #roomname:homeserver.org.
|
||||
String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null
|
||||
String get canonicalAlias => states[EventTypes.RoomCanonicalAlias] != null &&
|
||||
states[EventTypes.RoomCanonicalAlias].content['alias'] is String
|
||||
? states[EventTypes.RoomCanonicalAlias].content['alias']
|
||||
: '';
|
||||
|
||||
|
|
Loading…
Reference in a new issue