diff --git a/js/admin/src/components/AdminNav.js b/js/admin/src/components/AdminNav.js index 64c6d547c..5384e2bc7 100644 --- a/js/admin/src/components/AdminNav.js +++ b/js/admin/src/components/AdminNav.js @@ -18,9 +18,9 @@ export default class AdminNav extends Component { return ( + buttonClassName="Button"> + {this.items().toArray()} + ); } diff --git a/js/lib/utils/patchMithril.js b/js/lib/utils/patchMithril.js index 8935b2e79..3b88e1035 100644 --- a/js/lib/utils/patchMithril.js +++ b/js/lib/utils/patchMithril.js @@ -5,7 +5,12 @@ export default function patchMithril(global) { const m = function(comp, ...args) { if (comp.prototype && comp.prototype instanceof Component) { - return comp.component(args[0], args.slice(1)); + let children = args.slice(1); + if (children.length === 1 && Array.isArray(children[0])) { + children = children[0] + } + + return comp.component(args[0], children); } const node = mo.apply(this, arguments);