From e738d592dcd08deac5f54285514c120185b43b84 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Wed, 10 Sep 2014 16:10:53 -0400 Subject: [PATCH] fixed potential NaN issue https://github.com/NodeBB/NodeBB/issues/2077 --- src/favourites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/favourites.js b/src/favourites.js index 663bfec5f8..ae55417f5e 100644 --- a/src/favourites.js +++ b/src/favourites.js @@ -44,7 +44,7 @@ var async = require('async'), db.sortedSetAdd('users:reputation', newreputation, postData.uid); - if (parseInt(meta.config['autoban:downvote'], 10) !== 0 && newreputation < parseInt(meta.config['autoban:downvote:threshold'], 10)) { + if (parseInt(meta.config['autoban:downvote'], 10) === 1 && newreputation < parseInt(meta.config['autoban:downvote:threshold'], 10)) { var adminUser = require('./socket.io/admin/user'); adminUser.banUser(postData.uid, function() { require('winston').info('uid ' + uid + ' was banned for reaching ' + newreputation + ' reputation');