Skip to content

Commit

Permalink
Merge pull request #17 from maraisr/master
Browse files Browse the repository at this point in the history
Tree needs to be an array for JSX.
  • Loading branch information
Jorge Bucaran authored Feb 4, 2017
2 parents 28c2f3f + e9a4456 commit 0dd7d5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions h.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ module.exports = function (tag, data, tree) {
svg(tag, data, tree)
}

tree = Array.isArray(tree) ? tree : [tree];

return {
tag: tag,
data: data || {},
Expand Down

0 comments on commit 0dd7d5c

Please sign in to comment.