Cast dispatcher payloads correctly when firing them

This commit is contained in:
Travis Ralston 2022-03-31 19:38:00 -06:00
parent d5e70dfaa5
commit 71b356a9a4
4 changed files with 10 additions and 10 deletions

View file

@ -157,11 +157,11 @@ export class RoomViewStore extends Store<ActionPayload> {
// Fired so we can reduce dependency on event emitters to this store, which is relatively
// central to the application and can easily cause import cycles.
dis.dispatch({
dis.dispatch<ActiveRoomChangedPayload>({
action: Action.ActiveRoomChanged,
oldRoomId: lastRoomId,
newRoomId: this.state.roomId,
} as ActiveRoomChangedPayload);
});
}
this.__emitChange();