added message for challenges that could not be found - fixes #5538

closes #8176
This commit is contained in:
Corinna Jaschek
2016-10-29 23:22:05 +02:00
committed by Blade Barringer
parent a2dd82b6db
commit b094fb1e52
2 changed files with 5 additions and 0 deletions

View File

@@ -493,6 +493,8 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
.then(function (response) {
var challenge = response.data.data;
$scope.challenges = [challenge];
}).catch(function(err) {
$scope.challengeErrorMsg = err.data.message;
});
} else {
Challenges.getUserChallenges()