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

fix(TemplateParser): report empty expression #10391

Merged
merged 1 commit into from Aug 1, 2016
Merged

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Jul 29, 2016

fixes #3754

@vicb vicb added action: review The PR is still awaiting reviews from at least one requested reviewer comp: core/view/compiler labels Jul 29, 2016
@@ -234,6 +234,12 @@ class TemplateParseVisitor implements html.Visitor {

private _parseAction(value: string, sourceSpan: ParseSourceSpan): ASTWithSource {
const sourceInfo = sourceSpan.start.toString();

if (!value || value == '') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about (foo)=" " - I mean - we should also catch whitespaces. More generally I thought that this check needs to be done later, when the expression is parsed and we know if this is a valid action expression or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks !

@vicb vicb added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jul 30, 2016
@vicb
Copy link
Contributor Author

vicb commented Aug 1, 2016

@pkozlowski-opensource PTAL

@vicb vicb removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Aug 1, 2016
@pkozlowski-opensource
Copy link
Member

lgtm

@vicb vicb merged commit e73d051 into angular:master Aug 1, 2016
@vicb vicb deleted the 0729-gh3754 branch June 9, 2017 17:17
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: review The PR is still awaiting reviews from at least one requested reviewer cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpha35: Empty event expression produce cryptic error
4 participants