Merge pull request #2413 from matrix-org/travis/room-list-go-faster-please
Don't reset cached room list values when they are falsey
This commit is contained in:
@@ -277,7 +277,7 @@ class RoomListStore extends Store {
|
|||||||
const roomCache = this._state.roomCache;
|
const roomCache = this._state.roomCache;
|
||||||
if (!roomCache[roomId]) roomCache[roomId] = {};
|
if (!roomCache[roomId]) roomCache[roomId] = {};
|
||||||
|
|
||||||
if (value) roomCache[roomId][type] = value;
|
if (typeof value !== "undefined") roomCache[roomId][type] = value;
|
||||||
else delete roomCache[roomId][type];
|
else delete roomCache[roomId][type];
|
||||||
|
|
||||||
this._setState({roomCache});
|
this._setState({roomCache});
|
||||||
|
|||||||
Reference in New Issue
Block a user