Skip to content

Node.js based forum software built for the modern web

fix: topic events not rendered in infinitescroll

Barış Soner Uşaklıa7f235dbac4d
diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js
index 0914497bb2..b84953e915 100644
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@ -207,7 +207,8 @@ define('forum/topic/posts', [
app.parseAndTranslate('topic', 'posts', Object.assign({}, ajaxify.data, data), function (html) {
html = html.filter(function () {
const pid = $(this).attr('data-pid');
- return pid && $('[component="post"][data-pid="' + pid + '"]').length === 0;
+ const isPost = $(this).is('[component="post"]');
+ return !isPost || (pid && $('[component="post"][data-pid="' + pid + '"]').length === 0);
});
if (after) {