Skip to content

Node.js based forum software built for the modern web

Fixed: Category pagination error; Check if first offset is NaN

Micheil Smith47d21eb008e3
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;