Skip to content

Commit

Permalink
Fix up arrow error when there is no options
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo.perez authored and alexweissman committed Nov 22, 2017
1 parent 0087114 commit 34e8b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/select2/results.js
Expand Up @@ -340,7 +340,8 @@ define([
var currentIndex = $options.index($highlighted);

// If we are already at te top, don't move further
if (currentIndex === 0) {
// If no options, currentIndex will be -1
if (currentIndex <= 0) {
return;
}

Expand Down

1 comment on commit 34e8b69

@thebenlamm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea when this will be merged into master?

Please sign in to comment.