Skip to content

Commit

Permalink
refactor: fix wording
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jul 8, 2021
1 parent 47c8c69 commit 6ed7e93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6ed7e93

Please sign in to comment.