Closed TheKnarf closed 6 years ago
return `<${type}${attr}>${children.join('')}</${type}>`;
https://github.com/TheKnarf/isomorphic-jsx/blob/master/src/index.js#L28
Here children.join("")
should not generate ,
between the elements, unless the children array contains arrays inside itself. That might happen, we need to find a test case for it. If that's the case we might need some recursive function for handling those cases.
Wrote a recursive flattening function which fixes the problem:
const flatten = arr =>
Array.isArray(arr)
? arr.map(flatten).join('')
: arr;
Fixed in 7862bd30a1cb14138c37e4f94b87088a79e631cd