Skip to content

Commit

Permalink
Fix hasNext/hasPrev in underflow mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jsor committed Jan 9, 2014
1 parent 98511bb commit efc27b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core_plugin.js
Expand Up @@ -212,7 +212,7 @@
var wrap = this.options('wrap'),
end = this.items().length - 1;

return end >= 0 &&
return end >= 0 && !this.underflow &&
((wrap && wrap !== 'first') ||
(this.index(this._last) < end) ||
(this.tail && !this.inTail)) ? true : false;
Expand All @@ -224,7 +224,7 @@

var wrap = this.options('wrap');

return this.items().length > 0 &&
return this.items().length > 0 && !this.underflow &&
((wrap && wrap !== 'last') ||
(this.index(this._first) > 0) ||
(this.tail && this.inTail)) ? true : false;
Expand Down

0 comments on commit efc27b2

Please sign in to comment.