Skip to content

Node.js based forum software built for the modern web

fix: numThumb upgrade script

Barış Soner Uşaklıd9e2190a6b4b
diff --git a/src/upgrades/1.17.0/topic_thumb_count.js b/src/upgrades/1.17.0/topic_thumb_count.js
index a5239101d0..7e39b195ea 100644
--- a/src/upgrades/1.17.0/topic_thumb_count.js
+++ b/src/upgrades/1.17.0/topic_thumb_count.js
@@ -13,7 +13,7 @@ module.exports = {
await batch.processSortedSet('topics:tid', async (tids) => {
const keys = tids.map(tid => `topic:${tid}:thumbs`);
const counts = await db.sortedSetsCard(keys);
- const tidToCount = _.zip(tids, counts);
+ const tidToCount = _.zipObject(tids, counts);
const tidsWithThumbs = tids.filter((t, i) => counts[i] > 0);
await db.setObjectBulk(
tidsWithThumbs.map(tid => `topic:${tid}`),