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:
Travis Ralston 2019-01-07 18:01:37 -07:00 committed by GitHub
commit 58cff9f689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -277,7 +277,7 @@ class RoomListStore extends Store {
const roomCache = this._state.roomCache;
if (!roomCache[roomId]) roomCache[roomId] = {};
if (value) roomCache[roomId][type] = value;
if (typeof value !== "undefined") roomCache[roomId][type] = value;
else delete roomCache[roomId][type];
this._setState({roomCache});