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

Comments

Projects
None yet
2 participants
@narqo
Copy link
Member

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

@narqo narqo added bug v2 v4 labels Mar 2, 2015

@zxqfox

This comment has been minimized.

Copy link
Member

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 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

Vladimir Varankin
Merge pull request #893 from /issues/890@v2
i-bem: setMod/hasMod convert non-boolean values to string

narqo pushed a commit that referenced this issue May 6, 2015

Vladimir Varankin

narqo pushed a commit that referenced this issue May 6, 2015

Vladimir Varankin
Merge pull request #904 from /issues/890@v3
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
You can’t perform that action at this time.