FIX: broken badge show page

This commit is contained in:
Sam 2017-08-22 13:28:02 -04:00
parent d4c28f6fcb
commit ce8030716f
1 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,9 @@ UserBadge.reopenClass({
@returns {Promise} a promise that resolves to an array of `UserBadge`.
**/
findByUsername: function(username, options) {
if (!username) {
return Em.RSVP.resolve([]);
}
var url = "/user-badges/" + username + ".json";
if (options && options.grouped) {
url += "?grouped=true";