DEV: expose decorateUsername function (#17637)
Expose `decorateUsername` function to make it usable in controllers or plugin initializers.
This commit is contained in:
parent
3c60b97bd5
commit
228c14479b
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue