ESlint no-mixed-operators

This commit is contained in:
Peter Jaszkowiak
2017-02-18 01:51:11 -07:00
parent 2e031f3759
commit a5a3f3089a
22 changed files with 25 additions and 23 deletions

View File

@@ -162,7 +162,7 @@ module.exports = function (Posts) {
var hook;
var current = voteStatus.upvoted ? 'upvote' : 'downvote';
if (voteStatus.upvoted && command === 'downvote' || voteStatus.downvoted && command === 'upvote') { // e.g. User *has* upvoted, and clicks downvote
if ((voteStatus.upvoted && command === 'downvote') || (voteStatus.downvoted && command === 'upvote')) { // e.g. User *has* upvoted, and clicks downvote
hook = command;
} else if (voteStatus.upvoted || voteStatus.downvoted) { // e.g. User *has* upvoted, clicks upvote (so we "unvote")
hook = 'unvote';