FIX: can't create badges

This commit is contained in:
Sam 2014-07-31 09:09:03 +10:00
parent 220f9e21e3
commit 9926382185
1 changed files with 2 additions and 1 deletions

View File

@ -100,7 +100,8 @@ Discourse.Badge = Discourse.Model.extend({
},
badgeTypeClassName: function() {
return "badge-type-" + this.get('badge_type.name').toLowerCase();
var type = this.get('badge_type.name') || "";
return "badge-type-" + type.toLowerCase();
}.property('badge_type.name'),
/**