Skip to content

Node.js based forum software built for the modern web

fix: skip topic retrieval when cid is -1, as it is done again later

Julian Lam92191995916d
diff --git a/src/categories/index.js b/src/categories/index.js
index fa62b32501..3e0e0e4049 100644
--- a/src/categories/index.js
+++ b/src/categories/index.js
@@ -46,7 +46,7 @@ Categories.getCategoryById = async function (data) {
data.category = category;
const promises = [
- Categories.getCategoryTopics(data),
+ data.cid !== '-1' ? Categories.getCategoryTopics(data) : [],
Categories.getTopicCount(data),
Categories.getWatchState([data.cid], data.uid),
getChildrenTree(category, data.uid),