Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 8c03bfa

Browse files
author
vikasrohit
committed
SUP-2961, Dashboard: Active challenges not showing on dashboard after user unregisters
-- Fixed and adde unit tests
1 parent d2e6087 commit 8c03bfa

File tree

2 files changed

+707
-324
lines changed

2 files changed

+707
-324
lines changed

app/services/challenge.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
// if user has role of observer
8282
var roles = _.get(challenge, 'userDetails.roles', []);
83-
if (roles.length > 0) {
83+
if (roles && roles.length > 0) {
8484
var submitterRole = _.findIndex(roles, function(role) {
8585
var lRole = role.toLowerCase();
8686
return lRole === 'submitter';

0 commit comments

Comments
 (0)