Skip to content

Node.js based forum software built for the modern web

fix: convert cids to string for comparison

Barış Soner Uşaklıc47a1c4df416
diff --git a/src/controllers/helpers.js b/src/controllers/helpers.js
index a14ddde6e9..8ce5811cf0 100644
--- a/src/controllers/helpers.js
+++ b/src/controllers/helpers.js
@@ -222,7 +222,7 @@ async function getCategoryData(cids, uid, selectedCid, states) {
if (selectedCid && !Array.isArray(selectedCid)) {
selectedCid = [selectedCid];
}
-
+ selectedCid = selectedCid && selectedCid.map(String);
states = states || [categories.watchStates.watching, categories.watchStates.notwatching];
const [allowed, watchState, categoryData, isAdmin] = await Promise.all([