Skip to content

Commit d04eb9b

Browse files
committed
Revert "Fix javve#469"
This reverts commit b3db0de.
1 parent 5925747 commit d04eb9b

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

__test__/pagination.test.js

-8
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ describe('Pagination', function() {
9292
expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false);
9393
expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true);
9494
});
95-
96-
it('should handle page = 0', function() {
97-
expect(pagination.is(':visible')).toBe(true);
98-
list.show(0, 0);
99-
expect(pagination.is(':visible')).toBe(false);
100-
list.show(1, 1);
101-
expect(pagination.is(':visible')).toBe(true);
102-
});
10395
});
10496

10597

src/pagination.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,8 @@ var classes = require('./utils/classes'),
33
List = require('./index');
44

55
module.exports = function(list) {
6-
var isHidden = false;
76

87
var refresh = function(pagingList, options) {
9-
if (list.page < 1) {
10-
list.listContainer.style.display = 'none';
11-
isHidden = true;
12-
return;
13-
} else if (isHidden){
14-
list.listContainer.style.display = 'block';
15-
}
16-
178
var item,
189
l = list.matchingItems.length,
1910
index = list.i,
@@ -25,6 +16,7 @@ module.exports = function(list) {
2516
right = options.right || options.outerWindow || 0;
2617

2718
right = pages - right;
19+
2820
pagingList.clear();
2921
for (var i = 1; i <= pages; i++) {
3022
var className = (currentPage === i) ? "active" : "";

0 commit comments

Comments
 (0)