mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:06:57 +08:00
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`.
|
||||
**/
|
||||
findByUsername: function(username, options) {
|
||||
if (!username) {
|
||||
return Em.RSVP.resolve([]);
|
||||
}
|
||||
var url = "/user-badges/" + username + ".json";
|
||||
if (options && options.grouped) {
|
||||
url += "?grouped=true";
|
||||
|
|
Loading…
Reference in New Issue
Block a user