vrimar / construct-ui

A Mithril.js UI library
https://vrimar.github.io/construct-ui
MIT License
287 stars 23 forks source link

m(Grid) crashes when passed `false` as a child element #39

Closed raykyri closed 4 years ago

raykyri commented 4 years ago

The check for how to render Col looks for == null but doesn't check for false. If passed false, Grid.prototype.renderCols will end up throwing an exception on the line col.attrs = col.attrs || {};

vrimar commented 4 years ago

Mithril version 1.x treats false and strings as a vnode while version 2.x does not. I've added a fix to check if the col passed in is an object. Fixed in version 0.2.8.