fix: convert cids to string for comparison

This commit is contained in:
Barış Soner Uşaklı
2020-05-12 14:57:37 -04:00
parent 97c086aba9
commit c47a1c4df4

View File

@@ -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([