handle mixed type children correctly - fixes #443
This commit is contained in:
parent
4b92c821c2
commit
96b1f9e791
1 changed files with 4 additions and 4 deletions
|
|
@ -51,12 +51,12 @@ var m = (function app(window, undefined) {
|
||||||
if (classes.length > 0) cell.attrs[classAttrName] = classes.join(" ");
|
if (classes.length > 0) cell.attrs[classAttrName] = classes.join(" ");
|
||||||
|
|
||||||
|
|
||||||
var children = hasAttrs ? args[2] : args[1];
|
var children = hasAttrs ? args.slice(2) : args.slice(1);
|
||||||
if (type.call(children) === ARRAY) {
|
if (children.length === 1 && type.call(children[0]) === ARRAY) {
|
||||||
cell.children = children
|
cell.children = children[0]
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cell.children = hasAttrs ? args.slice(2) : args.slice(1)
|
cell.children = children
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var attrName in attrs) {
|
for (var attrName in attrs) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue