var statement no longer works at start of event string expression #2346
Unanswered
mpetty
asked this question in
7. Bugs (archived)
Replies: 1 comment 1 reply
-
|
You could wrap it in function handler or use window.test to explicitly hoist variable... I think it would be trivial to change regex in evaluator to let it through if you want to do PR and see what Caleb thinks. Is there reason you want this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This may be intentional, but I couldn't find it mentioned anywhere and there is a clear difference between alpine 2 and 3.
Starting a string expression with 'var' now throws an error while if, let, and const do not. This previously worked in version 2.
Does not work:
Works:
Example with error using 3.5.0
https://codepen.io/mpetty23/pen/zYdaWvR
Example working with 2.8.2
https://codepen.io/mpetty23/pen/rNzKdxY
Beta Was this translation helpful? Give feedback.
All reactions