diff options
author | dhoko <dhoko@cyaneus.org> | 2016-08-23 10:10:41 +0200 |
---|---|---|
committer | dhoko <dhoko@cyaneus.org> | 2016-08-23 10:10:41 +0200 |
commit | 32460c215aef7457b75110d83e6fdac52fa17edb (patch) | |
tree | d6a85d9354c5c1f5f300d2c724de2ccbfb608ae5 | |
parent | 7e4ed2afc50a0fb0b81b4f353e4a52f7001c4b49 (diff) | |
download | awesomplete-32460c215aef7457b75110d83e6fdac52fa17edb.zip awesomplete-32460c215aef7457b75110d83e6fdac52fa17edb.tar.gz awesomplete-32460c215aef7457b75110d83e6fdac52fa17edb.tar.bz2 |
Loop around options ~ remove tmp var
-rw-r--r-- | awesomplete.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/awesomplete.js b/awesomplete.js index 377ef7c..cd634b3 100644 --- a/awesomplete.js +++ b/awesomplete.js @@ -169,8 +169,7 @@ _.prototype = { next: function () { var count = this.ul.children.length; - var defaultPos = count ? 0 : -1; - this.goto(this.index < count - 1? this.index + 1 : defaultPos); + this.goto(this.index < count - 1 ? this.index + 1 : (count ? 0 : -1) ); }, previous: function () { |