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

Commit cf3e61b

Browse files
committed
F2F: Fix Profile Stats Loading Bug
Submission #518751 by ronakkaria to the challenge http://www.topcoder.com/challenge-details/30059340/?type=develop It looks like the correct fix; it works fine in the local tests; this commit is to try it in production, prior to final acceptance.
1 parent eeac4c5 commit cf3e61b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/profile/profile.controller.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ import moment from 'moment'
3838
activate()
3939

4040
// adding stats promise on scope so child states can use this.
41-
vm.statsPromise = ProfileService.getUserStats(vm.userHandle)
41+
vm.statsPromise = UserService.getV2UserProfile(vm.userHandle)
42+
.then(function(resp) {
43+
vm.profile.badges = resp
44+
return ProfileService.getUserStats(vm.userHandle)
45+
})
4246
.then(function(stats) {
4347
if (stats) {
4448
vm.stats = stats
@@ -112,10 +116,6 @@ import moment from 'moment'
112116
} else {
113117
profile.startMonth = null
114118
}
115-
UserService.getV2UserProfile(vm.userHandle).then(function(resp) {
116-
vm.profile.badges = resp
117-
})
118-
119119
}
120120

121121
function showBadges() {

0 commit comments

Comments
 (0)