mirror of
https://github.com/flarum/framework.git
synced 2025-05-29 11:40:18 +08:00
Flattening items breaks things; recurse to get the first element instead
This commit is contained in:
@ -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 = {};
|
||||
|
Reference in New Issue
Block a user