Flattening items breaks things; recurse to get the first element instead

This commit is contained in:
Toby Zerner
2015-06-26 13:52:54 +09:30
parent 558d12c870
commit 3ba495091e
2 changed files with 5 additions and 10 deletions

View File

@ -10,7 +10,11 @@ import ActionButton from 'flarum/components/action-button';
*/
export default class DropdownSplit extends Component {
view() {
var firstItem = this.props.items[0];
var firstItem = this.props.items;
while (firstItem instanceof Array) {
firstItem = firstItem[0];
}
var items = listItems(this.props.items);
var buttonProps = {};