mirror of
https://github.com/flarum/framework.git
synced 2024-12-01 14:20:47 +08:00
Update UserControls.js
Possibly c/p mistake with argument name. UserControls using argument discussion in controls method.
This commit is contained in:
parent
7837fff107
commit
14e49269d6
|
@ -18,11 +18,11 @@ export default {
|
|||
* @return {ItemList}
|
||||
* @public
|
||||
*/
|
||||
controls(discussion, context) {
|
||||
controls(user, context) {
|
||||
const items = new ItemList();
|
||||
|
||||
['user', 'moderation', 'destructive'].forEach(section => {
|
||||
const controls = this[section + 'Controls'](discussion, context).toArray();
|
||||
const controls = this[section + 'Controls'](user, context).toArray();
|
||||
if (controls.length) {
|
||||
controls.forEach(item => items.add(item.itemName, item));
|
||||
items.add(section + 'Separator', Separator.component());
|
||||
|
|
Loading…
Reference in New Issue
Block a user