Fix infinite loading spinner for badges that have not been granted yet.
This commit is contained in:
parent
8113e8d897
commit
e6eb16ee73
|
@ -18,6 +18,7 @@ Discourse.BadgesShowRoute = Ember.Route.extend({
|
|||
setupController: function(controller, model) {
|
||||
Discourse.UserBadge.findByBadgeId(model.get('id')).then(function(userBadges) {
|
||||
controller.set('userBadges', userBadges);
|
||||
controller.set('userBadgesLoaded', true);
|
||||
});
|
||||
controller.set('model', model);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
{{/link-to}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<div class='spinner'>{{i18n loading}}</div>
|
||||
{{#unless userBadgesLoaded}}
|
||||
<div class='spinner'>{{i18n loading}}</div>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue