arch-js / arch

Web application framework for React by Red Badger
BSD 3-Clause "New" or "Revised" License
170 stars 13 forks source link

Fix for `dangerouslySetInnerHTML` failing #47

Closed sheepsteak closed 9 years ago

sheepsteak commented 9 years ago

Using dangerouslySetInnerHTML currently throws an error as dom passes [] even if no children were specified:

Unhandled rejection Error: Invariant Violation: Can only set one of `children` or `props.dangerouslySetInnerHTML`.

I've added a check in the component function in dom to set props.children to void if no children were specified.