diff --git a/mithril.js b/mithril.js index 29082ca9..07cd891e 100644 --- a/mithril.js +++ b/mithril.js @@ -51,12 +51,12 @@ var m = (function app(window, undefined) { if (classes.length > 0) cell.attrs[classAttrName] = classes.join(" "); - var children = hasAttrs ? args[2] : args[1]; - if (type.call(children) === ARRAY) { - cell.children = children + var children = hasAttrs ? args.slice(2) : args.slice(1); + if (children.length === 1 && type.call(children[0]) === ARRAY) { + cell.children = children[0] } else { - cell.children = hasAttrs ? args.slice(2) : args.slice(1) + cell.children = children } for (var attrName in attrs) {