anthonyshort / deku

Render interfaces using pure functions and virtual DOM
https://github.com/anthonyshort/deku/tree/master/docs
3.41k stars 130 forks source link

Fixing an issue concerning string children passed to the element function #360

Closed Yomguithereal closed 8 years ago

Yomguithereal commented 8 years ago

Deku fails if someone passes strings/numbers into the children array:

// does not work as of 2.0.0-rc8
element('div', null, ['test'])

This PR fixes the problem and adds some tests (not exhaustive) to the element function.