Skip to content

Node.js based forum software built for the modern web

if category is not found return

barisusaklie5cc45a95bff
diff --git a/public/src/client/home.js b/public/src/client/home.js
index 013c351176..ca18223881 100644
--- a/public/src/client/home.js
+++ b/public/src/client/home.js
@@ -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)) {