Update UserControls.js

Possibly c/p mistake with argument name. UserControls using argument discussion in controls method.
This commit is contained in:
Daniël Klabbers 2017-05-17 14:07:38 +02:00 committed by GitHub
parent 7837fff107
commit 14e49269d6

View File

@ -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());