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)
|
||||
return;
|
||||
var container = $(document.body),
|
||||
scrollTo = $('#post_anchor_' + pid);
|
||||
scrollTo = $('#post_anchor_' + pid),
|
||||
tid = $('#post-container').attr('data-tid');
|
||||
|
||||
if(!scrollTo.length) {
|
||||
var tid = $('#post-container').attr('data-tid');
|
||||
while(!scrollTo.length) {
|
||||
app.loadMorePosts(tid, function() {
|
||||
app.scrollToPost(pid);
|
||||
scrollTo = $('#post_anchor_' + pid);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
container.animate({
|
||||
|
||||
Reference in New Issue
Block a user