-
Notifications
You must be signed in to change notification settings - Fork 2k
Consider annotator differentiating between [[3, 4]]
and [[binding]]
#1734
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
Comments
Why is there no warning when binding logic encounters: '[["Jan", 31],["Feb", 28],["Mar", 31]]'. It is not parseable as a binding, the code must swallow an error quietly somewhere. |
I think I found the offending check at https://github.com/Polymer/polymer/blob/master/src/lib/annotations/annotations.html#L93 I think the fix would be to check that the third character is either an underscore or a letter, as those are the only valid starting characters for bindable properties or computable functions, right? |
@zikes I think checking the 3rd character is not enough, for example
Will still fail to work properly. |
@SmokyBob I forgot about booleans, that throws a real wrench into that idea. Unfortunately that also rules out the comma check, as I think a |
I just remembered that computed annotations can have multiple parameters, which would also contain commas. |
You can solve this by adding a space between The mistake was using |
Unfortunately |
@zikes got me :) answering before coffee was not a good idea.
|
This issue is fixed as of #3017 |
Currently
[[
characters trigger binding logic immediately, even if the expression is actually JSON data.The text was updated successfully, but these errors were encountered: