From 47d21eb008e360235556824296a3d3626466cbe7 Mon Sep 17 00:00:00 2001 From: Micheil Smith Date: Mon, 7 Apr 2014 20:41:51 +0100 Subject: [PATCH] Fixed: Category pagination error; Check if first offset is NaN --- public/src/forum/category.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/src/forum/category.js b/public/src/forum/category.js index 14eb070a9d..7182aa19dc 100644 --- a/public/src/forum/category.js +++ b/public/src/forum/category.js @@ -144,6 +144,9 @@ define(['composer', 'forum/pagination', 'share', 'navigator'], function(composer } else { el = $('#topics-container .category-item[data-tid]').first(); after = parseInt(el.attr('data-index'), 10); + if(isNaN(after)){ + after = 0; + } after -= config.topicsPerPage; if(after < 0) { after = 0;