Skip to content

Node.js based forum software built for the modern web

fix: return early if there are not blocked uids

Baris Usakli73d14e4516d3
diff --git a/src/topics/unread.js b/src/topics/unread.js
index 9efe5c8363..02df4bd781 100644
--- a/src/topics/unread.js
+++ b/src/topics/unread.js
@@ -295,7 +295,9 @@ module.exports = function (Topics) {
var count = 3;
var done = false;
var hasUnblockedUnread = params.topicTimestamp > userLastReadTimestamp;
-
+ if (!params.blockedUids.length) {
+ return setImmediate(callback, null, hasUnblockedUnread);
+ }
async.whilst(function () {
return !done;
}, function (_next) {