Revert unsafe rename and use boolean coercion
This commit is contained in:
parent
6219e67a8a
commit
be5db851ca
4 changed files with 21 additions and 16 deletions
|
@ -382,7 +382,7 @@ export class Algorithm extends EventEmitter {
|
|||
|
||||
if (!this._stickyRoom) {
|
||||
// If there's no sticky room, just do nothing useful.
|
||||
if (this._cachedStickyRooms) {
|
||||
if (!!this._cachedStickyRooms) {
|
||||
// Clear the cache if we won't be needing it
|
||||
this._cachedStickyRooms = null;
|
||||
this.emit(LIST_UPDATED_EVENT);
|
||||
|
|
|
@ -262,8 +262,9 @@ export class ImportanceAlgorithm extends OrderingAlgorithm {
|
|||
|
||||
if (indices[lastCat] > indices[thisCat]) {
|
||||
// "should never happen" disclaimer goes here
|
||||
// eslint-disable-next-line max-len
|
||||
console.warn(`!! Room list index corruption: ${lastCat} (i:${indices[lastCat]}) is greater than ${thisCat} (i:${indices[thisCat]}) - category indices are likely desynced from reality`);
|
||||
console.warn(
|
||||
`!! Room list index corruption: ${lastCat} (i:${indices[lastCat]}) is greater ` +
|
||||
`than ${thisCat} (i:${indices[thisCat]}) - category indices are likely desynced from reality`);
|
||||
|
||||
// TODO: Regenerate index when this happens: https://github.com/vector-im/riot-web/issues/14234
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue