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

i-bem: setMod should convert non-boolean value to string #890

Closed
narqo opened this issue Mar 2, 2015 · 1 comment
Closed

i-bem: setMod should convert non-boolean value to string #890

narqo opened this issue Mar 2, 2015 · 1 comment

Comments

@narqo
Copy link
Member

narqo commented Mar 2, 2015

block.setMod('blah', 2);
console.log(typeof block.getMod('blah'));  // number

block.setMod('blah', '2');
console.log(typeof block.getMod('blah'));  // string

Current behaviour looks weird and it seems that any value in the example above may fire several onSetMod-handlers (see buildModFnName()).

And the same goes to hasMod

@qfox
Copy link
Member

qfox commented Mar 2, 2015

👍

@narqo narqo changed the title i-bem: setMod should cast non-boolean value to string i-bem: setMod should convert non-boolean value to string Mar 3, 2015
@narqo narqo closed this as completed in #893 Mar 7, 2015
narqo pushed a commit that referenced this issue Mar 7, 2015
narqo pushed a commit that referenced this issue Mar 7, 2015
i-bem: setMod/hasMod convert non-boolean values to string
narqo pushed a commit that referenced this issue May 6, 2015
narqo pushed a commit that referenced this issue May 6, 2015
i-bem: setMod/hasMod cast non-boolean mod values to string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants