Skip to content

Node.js based forum software built for the modern web

refactor: remove parens

Barış Soner Uşaklı8514606936e5
diff --git a/src/posts/votes.js b/src/posts/votes.js
index 915884fc2d..f67f381861 100644
--- a/src/posts/votes.js
+++ b/src/posts/votes.js
@@ -253,7 +253,7 @@ module.exports = function (Posts) {
return;
}
const threshold = meta.config['flags:autoFlagOnDownvoteThreshold'];
- if (threshold && postData.votes <= (-threshold)) {
+ if (threshold && postData.votes <= -threshold) {
const adminUid = await user.getFirstAdminUid();
const reportMsg = await translator.translate(`[[flags:auto-flagged, ${-postData.votes}]]`);
const flagObj = await flags.create('post', postData.pid, adminUid, reportMsg, null, true);