diff --git a/src/utils/rendition-helper.ts b/src/utils/rendition-helper.ts index 63dee30a3de..754c26f5efa 100644 --- a/src/utils/rendition-helper.ts +++ b/src/utils/rendition-helper.ts @@ -440,7 +440,7 @@ function searchDownAndUpList( searchIndex: number, predicate: (item: any) => boolean, ): number { - for (let i = searchIndex; i; i--) { + for (let i = searchIndex; i > -1; i--) { if (predicate(arr[i])) { return i; }