From 203db47b30881e5d41e7fe5d747e74818f3fff1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 24 Oct 2020 01:49:22 -0400 Subject: [PATCH] fix: return early for guests/spiders --- src/topics/unread.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/topics/unread.js b/src/topics/unread.js index f407da95a7..084eea8a74 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -67,7 +67,7 @@ module.exports = function (Topics) { } const data = await getTids(params); - if (!data.tids && !data.tids.length) { + if (uid <= 0 || !data.tids || !data.tids.length) { return data; }