DEV: Prevent empty admin topic buttons from rendering
When using api.decorateWidget("topic-admin-menu:adminMenuButtons") in plugins, an empty button is added if the helper only returns attributes based on a condition (for example, if the admin action is limited to public topics.) In that case, we need to exclude the button from rendering.
This commit is contained in:
parent
f62c9def33
commit
ff163ae980
|
@ -272,6 +272,7 @@ export default createWidget("topic-admin-menu", {
|
|||
"ul",
|
||||
buttons
|
||||
.concat(extraButtons)
|
||||
.filter(Boolean)
|
||||
.map(b => this.attach("admin-menu-button", b))
|
||||
)
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue