Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
raykyri opened this issue Aug 15, 2020 · 1 comment
Closed

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

raykyri opened this issue Aug 15, 2020 · 1 comment

Comments

@raykyri
Copy link

raykyri commented Aug 15, 2020

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 || {};

@raykyri raykyri changed the title m(Grid) crashes when passed false in its children m(Grid) crashes when passed false as a child element Aug 15, 2020
@vrimar vrimar closed this as completed in 0b18134 Aug 20, 2020
@vrimar
Copy link
Owner

vrimar commented Aug 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants