From 9627fa9029b2f69e7759ad0449c9ad9ded5c8449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 7 Dec 2021 18:43:14 -0500 Subject: [PATCH] refactor: always returns array --- src/user/posts.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); }; };