From fe58857f3b0e01d043240ad3495569bae20add0d Mon Sep 17 00:00:00 2001 From: Katy Ekey Date: Mon, 30 Oct 2017 17:59:15 -0400 Subject: [PATCH] BOP-1488: check for var undefined in lodash (teamLead vs teamLeads) --- .../profiles/client/controllers/user/user.client.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/profiles/client/controllers/user/user.client.controller.js b/modules/profiles/client/controllers/user/user.client.controller.js index a23090518..3f88bc8e8 100644 --- a/modules/profiles/client/controllers/user/user.client.controller.js +++ b/modules/profiles/client/controllers/user/user.client.controller.js @@ -169,7 +169,7 @@ if ($scope.currentUser) { var memberIndex = lodash.findIndex(allTeamMembers, function(m) { - return m.username === $scope.currentUser.username; + return m && (m.username === $scope.currentUser.username); }); return (memberIndex > -1) ? true : false; } else {