From 857e22f943cbac78bd514f387f09f22ad9258ae4 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Wed, 26 Apr 2023 09:57:33 +0200 Subject: [PATCH] Fix condition of logging possible room list corruption (#10685) * Revert condition of logging possible room list corruption * Fix loop condition --- .../room-list/algorithms/list-ordering/ImportanceAlgorithm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts index 7c6ae4a617..e0dfb5adca 100644 --- a/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/ImportanceAlgorithm.ts @@ -287,7 +287,7 @@ export class ImportanceAlgorithm extends OrderingAlgorithm { } // Do a quick check to see if we've completely broken the index - for (let i = 1; i <= CATEGORY_ORDER.length; i++) { + for (let i = 1; i < CATEGORY_ORDER.length; i++) { const lastCat = CATEGORY_ORDER[i - 1]; const lastCatIndex = indices[lastCat]; const thisCat = CATEGORY_ORDER[i];