From 504090655c0df9edda6b69822febdd9298a5ce1b Mon Sep 17 00:00:00 2001 From: fatchan Date: Sat, 15 Jun 2019 11:56:54 +0000 Subject: [PATCH] return the empty array instead of a new one --- controllers/forms.js | 2 +- db/posts.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/forms.js b/controllers/forms.js index 805570cb..9e155c46 100644 --- a/controllers/forms.js +++ b/controllers/forms.js @@ -394,7 +394,7 @@ async function boardActionController(req, res, next) { errors.push('File spoilers are disabled on this board'); } if (req.body.unlink_file && !res.locals.board.settings.userPostUnlink) { - errors.push('File unlinking disabled on this board'); + errors.push('File unlinking is disabled on this board'); } } diff --git a/db/posts.js b/db/posts.js index 83d06d44..cce38801 100644 --- a/db/posts.js +++ b/db/posts.js @@ -346,7 +346,7 @@ module.exports = { }).skip(threadLimit).toArray(); //if there are any if (threads.length === 0) { - return []; + return threads; } //get the postIds const threadIds = threads.map(thread => thread.postId);