Skip to content

Commit

Permalink
Fixed off by 1 bug (#1935)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Apr 24, 2024
1 parent 90b96d9 commit 8ae77ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/spectrum/utils/itemUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export async function getPositionOfSelectedItemElement<
return position;
}

for (let i = 0; i <= items.length; i += 1) {
for (let i = 0; i < items.length; i += 1) {
const item = items[i];
if (item.key === selectedKey) {
return position;
Expand Down

0 comments on commit 8ae77ea

Please sign in to comment.