fix index error

v1.18.x
barisusakli
parent b0f630aaec
commit 240682563d

@ -212,7 +212,7 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
if (config.usePagination) { if (config.usePagination) {
var index = postIndex; var index = postIndex;
if (config.topicPostSort === 'most_votes' || config.topicPostSort === 'newest_to_oldest') { if (config.topicPostSort === 'most_votes' || config.topicPostSort === 'newest_to_oldest') {
index = ajaxify.data.postcount - 1 - index; index = ajaxify.data.postcount - index;
} }
var page = Math.max(1, Math.ceil(index / config.postsPerPage)); var page = Math.max(1, Math.ceil(index / config.postsPerPage));

Loading…
Cancel
Save