mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
simpler check
This commit is contained in:
@@ -13,12 +13,11 @@ define('forum/topic/posts', [
|
|||||||
var Posts = {};
|
var Posts = {};
|
||||||
|
|
||||||
Posts.onNewPost = function(data) {
|
Posts.onNewPost = function(data) {
|
||||||
var tid = ajaxify.data.tid;
|
if (!data || !data.posts || !data.posts.length) {
|
||||||
if (data && data.posts && data.posts.length && parseInt(data.posts[0].tid, 10) !== parseInt(tid, 10)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data || !data.posts || !data.posts.length) {
|
if (parseInt(data.posts[0].tid, 10) !== parseInt(ajaxify.data.tid, 10)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user