diff --git a/src/upgrades/1.15.0/fullname_search_set.js b/src/upgrades/1.15.0/fullname_search_set.js index 9f479af145..c3955226bd 100644 --- a/src/upgrades/1.15.0/fullname_search_set.js +++ b/src/upgrades/1.15.0/fullname_search_set.js @@ -16,7 +16,7 @@ module.exports = { const userData = await user.getUsersFields(uids, ['uid', 'fullname']); const bulkAdd = userData .filter(u => u.uid && u.fullname) - .map(u => ['fullname:sorted', 0, u.fullname.substr(0, 255).toLowerCase() + ':' + u.uid]); + .map(u => ['fullname:sorted', 0, String(u.fullname).substr(0, 255).toLowerCase() + ':' + u.uid]); await db.sortedSetAddBulk(bulkAdd); }, { batch: 500,