mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 13:26:25 +02:00
if category is not found return
if cid is a child category it wont be on home
This commit is contained in:
@@ -31,6 +31,9 @@ define('forum/home', function() {
|
||||
|
||||
function renderNewPost(cid, post) {
|
||||
var category = $('.home .category-item[data-cid="' + cid + '"]');
|
||||
if (!category.length) {
|
||||
return;
|
||||
}
|
||||
var categoryBox = category.find('.category-box');
|
||||
var numRecentReplies = category.attr('data-numRecentReplies');
|
||||
if (!numRecentReplies || !parseInt(numRecentReplies, 10)) {
|
||||
|
||||
Reference in New Issue
Block a user