This commit is contained in:
barisusakli
2015-08-28 15:12:40 -04:00
parent c3719ea5b5
commit 7689d54d42

View File

@@ -122,7 +122,7 @@ define('forum/topic', [
if (postIndex && window.location.search.indexOf('page=') === -1) { if (postIndex && window.location.search.indexOf('page=') === -1) {
if (components.get('post/anchor', postIndex).length) { if (components.get('post/anchor', postIndex).length) {
return navigator.scrollToPostIndex(postIndex - 1, true); return navigator.scrollToPostIndex(postIndex, true);
} }
} else if (bookmark && (!config.usePagination || (config.usePagination && pagination.currentPage === 1)) && ajaxify.data.postcount > 1) { } else if (bookmark && (!config.usePagination || (config.usePagination && pagination.currentPage === 1)) && ajaxify.data.postcount > 1) {
app.alert({ app.alert({
@@ -144,7 +144,7 @@ define('forum/topic', [
var parts = window.location.pathname.split('/'); var parts = window.location.pathname.split('/');
var lastPart = parts[parts.length - 1]; var lastPart = parts[parts.length - 1];
if (lastPart && utils.isNumber(lastPart)) { if (lastPart && utils.isNumber(lastPart)) {
lastPart = parseInt(lastPart, 10); lastPart = Math.max(0, parseInt(lastPart, 10) - 1);
} else { } else {
return 0; return 0;
} }