[RoomState] User nullchecker

This commit is contained in:
Christian Pauly 2019-08-29 11:23:51 +02:00
parent 58976c3b9c
commit 47b708b6ba

View file

@ -36,7 +36,7 @@ class RoomState extends RawEvent {
/// the overwriting semantics for this piece of room state.
final String stateKey;
User get stateKeyUser => room.states[stateKey].asUser ?? User(stateKey);
User get stateKeyUser => room.states[stateKey]?.asUser ?? User(stateKey);
RoomState(
{this.prevContent,