From 6ed7e937ce1aacd58cdf22d2189b7dcfb597675d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 8 Jul 2021 11:07:52 -0400 Subject: [PATCH] refactor: fix wording --- src/controllers/topics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/topics.js b/src/controllers/topics.js index 2ada5f590a..b40f2efe05 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -44,11 +44,11 @@ topicsController.get = async function getTopic(req, res, callback) { let currentPage = parseInt(req.query.page, 10) || 1; const pageCount = Math.max(1, Math.ceil((topicData && topicData.postcount) / settings.postsPerPage)); - const validPagination = (settings.usePagination && (currentPage < 1 || currentPage > pageCount)); + const invalidPagination = (settings.usePagination && (currentPage < 1 || currentPage > pageCount)); if ( !topicData || userPrivileges.disabled || - validPagination || + invalidPagination || (topicData.scheduled && !userPrivileges.view_scheduled) ) { return callback();