diff --git a/app/assets/javascripts/discourse/app/helpers/decorate-username-selector.js b/app/assets/javascripts/discourse/app/helpers/decorate-username-selector.js index c8fb7b6812e..d7558359a09 100644 --- a/app/assets/javascripts/discourse/app/helpers/decorate-username-selector.js +++ b/app/assets/javascripts/discourse/app/helpers/decorate-username-selector.js @@ -10,7 +10,7 @@ export function resetUsernameDecorators() { usernameDecorators = []; } -export default registerUnbound("decorate-username-selector", (username) => { +export function decorateUsername(username) { const decorations = []; usernameDecorators.forEach((decorator) => { @@ -18,4 +18,8 @@ export default registerUnbound("decorate-username-selector", (username) => { }); return decorations.length ? htmlSafe(decorations.join("")) : ""; +} + +export default registerUnbound("decorate-username-selector", (username) => { + return decorateUsername(username); });