We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
on
Beginning with ember v5.12 the error handing is not helpful when you forget to create the pass function to on modifier.
Create a hbs file with this content:
hbs
<div {{on "click" this.myfunction}}></div>
Minimal reproduction: https://github.com/mkszepp/ember-missing-action-function
If you forget to create the function in js/ts you will get this error: Error in Firefox: Uncaught TypeError: userProvidedCallback is undefined
Uncaught TypeError: userProvidedCallback is undefined
Error in Chrome: Uncaught TypeError: Cannot read properties of undefined (reading 'bind')
Uncaught TypeError: Cannot read properties of undefined (reading 'bind')
We should bring back better error handling like it was in <= v5.11
Uncaught Error: You must pass a function as the second argument to the `on` modifier; you passed undefined. While rendering: this.myfunction
While looking the commit it looks like the error was introduced here 2d9fc01#diff-301b4fe274bd34f5552c35fc1f58078575896ba487df721bed939eb1d0fe9891R75
The answer of @NullVoxPopuli was see
oofta -- that check stuff in general is supposed to be stripped during glimmer-vm publish. thank you for finding and reporting this!!!
oofta -- that check stuff in general is supposed to be stripped during glimmer-vm publish.
check
thank you for finding and reporting this!!!
Original post
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🐞 Describe the Bug
Beginning with ember v5.12 the error handing is not helpful when you forget to create the pass function to
on
modifier.🔬 Minimal Reproduction
Create a
hbs
file with this content:Minimal reproduction: https://github.com/mkszepp/ember-missing-action-function
😕 Actual Behavior
If you forget to create the function in js/ts you will get this error:
Error in Firefox:
Uncaught TypeError: userProvidedCallback is undefined
Error in Chrome:
Uncaught TypeError: Cannot read properties of undefined (reading 'bind')
🤔 Expected Behavior
We should bring back better error handling like it was in <= v5.11
Possible error position
While looking the commit it looks like the error was introduced here
2d9fc01#diff-301b4fe274bd34f5552c35fc1f58078575896ba487df721bed939eb1d0fe9891R75
The answer of @NullVoxPopuli was see
🌍 Environment
Original post
The text was updated successfully, but these errors were encountered: