Skip to content

Commit

Permalink
Predicate is not called for index 0 (#6775)
Browse files Browse the repository at this point in the history
(cherry picked from commit e21e807)
  • Loading branch information
matvp91 authored and robwalch committed Oct 17, 2024
1 parent 8a96fe9 commit 518ec40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/rendition-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 518ec40

Please sign in to comment.