mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
fix first reply insertion
This commit is contained in:
@@ -123,9 +123,9 @@ define('forum/topic/posts', [
|
|||||||
|
|
||||||
var after, before;
|
var after, before;
|
||||||
|
|
||||||
if (direction === 1) {
|
if (direction === 1 && repliesSelector.length) {
|
||||||
after = repliesSelector.last();
|
after = repliesSelector.last();
|
||||||
} else if (direction === -1) {
|
} else if (direction === -1 && repliesSelector.length) {
|
||||||
before = repliesSelector.first();
|
before = repliesSelector.first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
|
|||||||
|
|
||||||
navigator.scrollToPostIndex = function(postIndex, highlight, duration, offset) {
|
navigator.scrollToPostIndex = function(postIndex, highlight, duration, offset) {
|
||||||
var scrollTo = components.get('post/anchor', postIndex);
|
var scrollTo = components.get('post/anchor', postIndex);
|
||||||
|
|
||||||
if (!scrollTo.length) {
|
if (!scrollTo.length) {
|
||||||
navigator.scrollActive = false;
|
navigator.scrollActive = false;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user