Merge pull request #1186 from flarum/Luceos-patch-1

Update UserControls.js
This commit is contained in:
Franz Liedke 2017-05-18 09:13:28 +02:00 committed by GitHub
commit 7c86f7a34c

View File

@ -18,11 +18,11 @@ export default {
* @return {ItemList} * @return {ItemList}
* @public * @public
*/ */
controls(discussion, context) { controls(user, context) {
const items = new ItemList(); const items = new ItemList();
['user', 'moderation', 'destructive'].forEach(section => { ['user', 'moderation', 'destructive'].forEach(section => {
const controls = this[section + 'Controls'](discussion, context).toArray(); const controls = this[section + 'Controls'](user, context).toArray();
if (controls.length) { if (controls.length) {
controls.forEach(item => items.add(item.itemName, item)); controls.forEach(item => items.add(item.itemName, item));
items.add(section + 'Separator', Separator.component()); items.add(section + 'Separator', Separator.component());