Skip to content

Commit

Permalink
chore: back to loop mode
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarulislam committed Sep 6, 2023
1 parent e07021d commit 15d8c2e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions packages/hoppscotch-common/src/components/app/spotlight/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,8 @@ function newUseArrowKeysForNavigation() {
})
const onArrowDown = () => {
// If no entries or last entry, do nothing
if (
scoredResults.value.length === 0 ||
isEqual(selectedEntry.value, [
scoredResults.value.length - 1,
scoredResults.value[scoredResults.value.length - 1][1].results.length -
1,
])
)
return
// If no entries, do nothing
if (scoredResults.value.length === 0) return
const [sectionIndex, entryIndex] = selectedEntry.value
Expand All @@ -229,12 +221,8 @@ function newUseArrowKeysForNavigation() {
}
const onArrowUp = () => {
// If no entries or first entry, do nothing
if (
scoredResults.value.length === 0 ||
isEqual(selectedEntry.value, [0, 0])
)
return
// If no entries, do nothing
if (scoredResults.value.length === 0) return
const [sectionIndex, entryIndex] = selectedEntry.value
Expand Down

0 comments on commit 15d8c2e

Please sign in to comment.