Node.js based forum software built for the modern web
use bind
Barış Soner Uşaklı5c005bbbdf4d
diff --git a/src/flags.js b/src/flags.jsindex ede0871b83..9022af2c45 100644--- a/src/flags.js+++ b/src/flags.js@@ -338,7 +338,7 @@ Flags.create = function (type, id, uid, reason, timestamp, callback) {if (type === 'post') {tasks.push(async.apply(db.sortedSetAdd.bind(db), 'flags:byPid:' + id, timestamp, flagId)); // by target pidif (targetUid) {- tasks.push(async.apply(db.sortedSetIncrBy, 'users:flags', 1, targetUid));+ tasks.push(async.apply(db.sortedSetIncrBy.bind(db), 'users:flags', 1, targetUid));}}