-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
fix(compiler): not catching for loop empty tracking expressions #54772
Conversation
Fixes that the template parser wasn't catching empty expressions in the `track` parameter of for loops. Fixes angular#54763.
@@ -1520,6 +1520,11 @@ describe('R3 template transform', () => { | |||
@case {case} | |||
} | |||
`)).toThrowError(/@case block must have exactly one parameter/); | |||
expect(() => parse(` | |||
@switch (cond) { | |||
@case ( ) {case} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some extra tests for switches and conditionals, but they didn't have this problem.
Thank you @crisbeto ! |
This PR was merged into the repository by commit 81ccf5d. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that the template parser wasn't catching empty expressions in the
track
parameter of for loops.Fixes #54763.