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

Expression ".foo = 5" is always false, only works with ".foo = '5'". AKA Exhibit.Set only stores strings #137

Open
Pike opened this issue Jun 12, 2015 · 0 comments

Comments

@Pike
Copy link
Contributor

Pike commented Jun 12, 2015

When comparing for equality, the operator doesn't try to parse numbers, and thus always comes back with false.

In a way this is due to the fact that you can put Strings, Numbers and Booleans into an Exhibit.Set, but it only returns Strings.

ES6 has a real Set, but that probably breaks browser compat. Maybe use a shim that's out there?

Also, changing the semantics of Exhibit.Set() might break a ton of sites, sadly.

Pike added a commit to mozilla/elmo that referenced this issue Jun 12, 2015
Filed simile-widgets/exhibit#137 upstream on the
actual issue, but for now we're working around the problem by comparing
our status numbers to strings.
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

1 participant