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

Commit bd5c23a

Browse files
committed
Cleanup
1 parent cdba228 commit bd5c23a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/directives/challenge-user-place/challenge-user-place.directive.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@
4444

4545
function activate() {
4646
$scope.numImages = 0;
47-
if (!$scope.challenge.isPrivate && $scope.challenge.userDetails.submissions && $scope.challenge.userDetails.submissions.length > 0) {
47+
if ($scope.challenge.userDetails.submissions && $scope.challenge.userDetails.submissions.length > 0) {
4848
$scope.challenge.userDetails.submissions = $scope.challenge.userDetails.submissions.filter(function(submission) {
4949
return submission && submission.submissionImage;
5050
});
51+
}
52+
if (!$scope.challenge.isPrivate && $scope.challenge.userDetails.submissions && $scope.challenge.userDetails.submissions.length > 0) {
5153
$scope.numImages = $scope.challenge.userDetails.submissions.length;
5254
$scope.selectedIndex = 0;
5355
$scope.challenge.thumbnailId = $scope.challenge.userDetails.submissions[0].id;

0 commit comments

Comments
 (0)