Permalink
Browse files

fix case when paginating types with no results

  • Loading branch information...
1 parent 22e2f89 commit b4bddb07f05207b9c54b1a2cc4210a5eaf0a1e47 @qhoxie qhoxie committed Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 jquery.swiftype.search.js
@@ -185,7 +185,7 @@
};
var renderPagination = function (ctx, resultInfo) {
- var maxPagesType, maxPages = 0;
+ var maxPagesType, maxPages = -1;
$.each(resultInfo, function(documentType, typeInfo) {
if (typeInfo.num_pages > maxPages) {
maxPagesType = documentType;

0 comments on commit b4bddb0

Please sign in to comment.