Set state from dispatch payload unconditionally

As apparently doing it confitionally is bad
pull/21833/head
David Baker 2017-06-02 13:41:41 +01:00
parent 03f4f269ce
commit f52035f3cd
1 changed files with 7 additions and 11 deletions

View File

@ -158,21 +158,17 @@ class RoomViewStore extends Store {
} }
_joinedRoom(payload) { _joinedRoom(payload) {
if (payload.room_id === this._state.roomId) {
this._setState({ this._setState({
joining: false, joining: false,
}); });
} }
}
_joinRoomError(payload) { _joinRoomError(payload) {
if (payload.room_id === this._state.roomId) {
this._setState({ this._setState({
joining: false, joining: false,
joinError: payload.err, joinError: payload.err,
}); });
} }
}
reset() { reset() {
this._state = Object.assign({}, INITIAL_STATE); this._state = Object.assign({}, INITIAL_STATE);