[RoomState] User nullchecker
This commit is contained in:
parent
58976c3b9c
commit
47b708b6ba
|
@ -36,7 +36,7 @@ class RoomState extends RawEvent {
|
||||||
/// the overwriting semantics for this piece of room state.
|
/// the overwriting semantics for this piece of room state.
|
||||||
final String stateKey;
|
final String stateKey;
|
||||||
|
|
||||||
User get stateKeyUser => room.states[stateKey].asUser ?? User(stateKey);
|
User get stateKeyUser => room.states[stateKey]?.asUser ?? User(stateKey);
|
||||||
|
|
||||||
RoomState(
|
RoomState(
|
||||||
{this.prevContent,
|
{this.prevContent,
|
||||||
|
|
Loading…
Reference in a new issue