Skip to content

Commit

Permalink
backport crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed May 9, 2017
1 parent 3b626f7 commit 291df36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/flags.js
Expand Up @@ -15,7 +15,7 @@ var utils = require('../public/src/utils');
var _ = require('underscore');
var S = require('string');

var Flags = {};
var Flags = module.exports;

Flags.get = function (flagId, callback) {
async.waterfall([
Expand All @@ -26,6 +26,9 @@ Flags.get = function (flagId, callback) {
notes: async.apply(Flags.getNotes, flagId),
}),
function (data, next) {
if (!data.base) {
return callback();
}
// Second stage
async.parallel({
userObj: async.apply(user.getUserFields, data.base.uid, ['username', 'userslug', 'picture']),
Expand Down Expand Up @@ -682,5 +685,3 @@ Flags.notify = function (flagObj, uid, callback) {
break;
}
};

module.exports = Flags;

0 comments on commit 291df36

Please sign in to comment.