From ce8030716f76339d81df0e04b78ec9ac02510c31 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 22 Aug 2017 13:28:02 -0400 Subject: [PATCH] FIX: broken badge show page --- app/assets/javascripts/discourse/models/user-badge.js.es6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/models/user-badge.js.es6 b/app/assets/javascripts/discourse/models/user-badge.js.es6 index e3a6872432b..ebf44e5efd9 100644 --- a/app/assets/javascripts/discourse/models/user-badge.js.es6 +++ b/app/assets/javascripts/discourse/models/user-badge.js.es6 @@ -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";