Skip to content

Node.js based forum software built for the modern web

refactor: always returns array

Barış Soner Uşaklı9627fa9029b2
diff --git a/src/user/posts.js b/src/user/posts.js
index 5885885b06..65d80849ef 100644
--- a/src/user/posts.js
+++ b/src/user/posts.js
@@ -109,7 +109,6 @@ module.exports = function (User) {
}
User.getPostIds = async function (uid, start, stop) {
- const pids = await db.getSortedSetRevRange(`uid:${uid}:posts`, start, stop);
- return Array.isArray(pids) ? pids : [];
+ return await db.getSortedSetRevRange(`uid:${uid}:posts`, start, stop);
};
};