You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you forget to create the function in js/ts you will get this error:
Error in Firefox: Unhelpful error when there was not function passed to on modifier
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
Uncaught Error: You must pass a function as the second argument to the `on` modifier; you passed undefined. While rendering:
this.myfunction
🌍 Environment
Ember: 5.12.0
Ember-CLI: 5.12.0
Node.js/pnpm: v20 / v9
OS: Linux / WIndows
Browser: Firefox / Chrome
The text was updated successfully, but these errors were encountered:
mkszepp
changed the title
Non helpful error when the function for on modifier was forget to add
[5.12] Non helpful error when the function for on modifier was forget to add
Oct 25, 2024
🐞 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:
Unhelpful error when there was not function passed to on modifier
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
🌍 Environment
The text was updated successfully, but these errors were encountered: