Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Julian Lam
2017-03-10 15:44:29 -05:00
26 changed files with 250 additions and 111 deletions

View File

@@ -204,7 +204,7 @@ module.exports = function (Topics) {
Topics.markAsRead = function (tids, uid, callback) {
callback = callback || function () {};
if (!Array.isArray(tids) || !tids.length) {
return callback();
return setImmediate(callback, null, false);
}
tids = tids.filter(function (tid, index, array) {
@@ -212,7 +212,7 @@ module.exports = function (Topics) {
});
if (!tids.length) {
return callback(null, false);
return setImmediate(callback, null, false);
}
async.waterfall([