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] parser: make t-on stricter #1442

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

ged-odoo
Copy link
Contributor

Before this commit, the t-on directive assumed that the next character would be a -, and ignored it, so if someone would write t-onclick by mistake, Owl would then add an event handler on the lick event, instead of click.

With this commit, we improve the parser to make it stricter and fail if there is no dash.

closes #1441

@ged-odoo
Copy link
Contributor Author

@sdegueldre

src/compiler/parser.ts Outdated Show resolved Hide resolved
Before this commit, the `t-on` directive assumed that the next character
would be a -, and ignored it, so if someone would write `t-onclick` by
mistake, Owl would then add an event handler on the `lick` event,
instead of `click`.

With this commit, we improve the parser to make it stricter and fail if
there is no dash.

closes #1441
@ged-odoo ged-odoo force-pushed the issue-1441-stricter-t-on-ged branch from 2f41f15 to 23cee65 Compare May 30, 2023 07:30
@ged-odoo
Copy link
Contributor Author

@brboi

@brboi brboi merged commit fbf4c4a into master May 30, 2023
@brboi brboi deleted the issue-1441-stricter-t-on-ged branch May 30, 2023 11:30
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

Successfully merging this pull request may close these issues.

t-on directive should be stricter
2 participants