mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
changed the recursion to load posts to a while loop
This commit is contained in:
@@ -343,14 +343,13 @@ var socket,
|
|||||||
if(!pid)
|
if(!pid)
|
||||||
return;
|
return;
|
||||||
var container = $(document.body),
|
var container = $(document.body),
|
||||||
scrollTo = $('#post_anchor_' + pid);
|
scrollTo = $('#post_anchor_' + pid),
|
||||||
|
tid = $('#post-container').attr('data-tid');
|
||||||
|
|
||||||
if(!scrollTo.length) {
|
while(!scrollTo.length) {
|
||||||
var tid = $('#post-container').attr('data-tid');
|
|
||||||
app.loadMorePosts(tid, function() {
|
app.loadMorePosts(tid, function() {
|
||||||
app.scrollToPost(pid);
|
scrollTo = $('#post_anchor_' + pid);
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
container.animate({
|
container.animate({
|
||||||
|
|||||||
Reference in New Issue
Block a user