FIX: broken badge show page
This commit is contained in:
parent
d4c28f6fcb
commit
ce8030716f
|
@ -86,6 +86,9 @@ UserBadge.reopenClass({
|
||||||
@returns {Promise} a promise that resolves to an array of `UserBadge`.
|
@returns {Promise} a promise that resolves to an array of `UserBadge`.
|
||||||
**/
|
**/
|
||||||
findByUsername: function(username, options) {
|
findByUsername: function(username, options) {
|
||||||
|
if (!username) {
|
||||||
|
return Em.RSVP.resolve([]);
|
||||||
|
}
|
||||||
var url = "/user-badges/" + username + ".json";
|
var url = "/user-badges/" + username + ".json";
|
||||||
if (options && options.grouped) {
|
if (options && options.grouped) {
|
||||||
url += "?grouped=true";
|
url += "?grouped=true";
|
||||||
|
|
Loading…
Reference in New Issue