ESlint one-var, fix comma-dangle

This commit is contained in:
Peter Jaszkowiak
2017-02-17 20:20:42 -07:00
parent bc1d70c126
commit 2ba46808a1
109 changed files with 774 additions and 709 deletions

View File

@@ -158,9 +158,9 @@ module.exports = function (Posts) {
return callback(new Error('[[error:not-enough-reputation-to-downvote]]'));
}
var voteStatus = results.voteStatus,
hook,
current = voteStatus.upvoted ? 'upvote' : 'downvote';
var voteStatus = results.voteStatus;
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
hook = command;