Skip to content

Commit e5964cb

Browse files
WardormeurDanielBrierton
authored andcommitted
Because there is no default value to children
1 parent 75e0687 commit e5964cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/controllers/application/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = function (args, done) {
1313
seneca.act({role: 'cd-profiles', cmd: 'load_user_profile', userId: user.id},
1414
function (err, profile) {
1515
if (err) return done(err);
16-
var children = profile.children;
16+
var children = profile.children || [];
1717
var userIds = children.concat(user.id);
1818
seneca.act({role: role, cmd: 'searchApplications', query: {userId: { in$: userIds }, eventId: eventId, deleted: 0, status: {ne$: 'cancelled'}}},
1919
function (err, applications) {

0 commit comments

Comments
 (0)