arch-js / arch

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

arch.dom created factory can't handle no arguments (props or children) #77

Closed chrisvfritz closed 9 years ago

chrisvfritz commented 9 years ago
arch.dom(MyComponent)!

results in:

Unhandled rejection TypeError: Cannot read property 'length' of undefined
    at empty (/Users/fritzc/Dropbox/code/arch-bww/node_modules/prelude-ls/lib/List.js:87:13)
    at component (/Users/fritzc/Dropbox/code/arch-bww/node_modules/arch/lib/dom.js:39:23)
chrisvfritz commented 9 years ago

I believe this can be solved by changing this line to:

unless empty (children or [])