return the empty array instead of a new one

merge-requests/208/head
fatchan 5 years ago
parent a794790a00
commit 504090655c
  1. 2
      controllers/forms.js
  2. 2
      db/posts.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');
}
}

@ -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);

Loading…
Cancel
Save