ember.js: Cannot read property 'eventName' of undefined
I’ve got a component which is conditionally rendered based on the value of a boolean. If that boolean value is changed by an action from within that component, the above error is thrown when the component is removed from the view.
Seems like it was introduced with canary and is happening from 2.13.0-alpha.1-canary+96c0bb79 onward.
Here’s a simple twiddle demonstrating: https://ember-twiddle.com/b86adfba657f450a4d264e01a3fb0d37?openFiles=templates.application.hbs%2Ctemplates.components.my-component.hbs
Seems related to #1643. The stack trace points to the same block patched by pivotal-topher-bullock@74e0d58.
Stack trace:
Uncaught TypeError: Cannot read property 'eventName' of undefined
at HTMLButtonElement.<anonymous> (ember.debug.js:43826)
at HTMLDivElement.dispatch (VM229 jquery.js:4670)
at HTMLDivElement.elemData.handle (VM229 jquery.js:4338)
at Object.trigger (VM229 jquery.js:4579)
at Object.simulate (VM229 jquery.js:4906)
at HTMLDocument.handler (VM229 jquery.js:5169)
at clear (ember.debug.js:916)
at UpdatableBlockTracker.reset (ember.debug.js:916)
at TryOpcode.handleException (ember.debug.js:1070)
at UpdatingVMFrame.handleException (ember.debug.js:1071)
// disclosed
(anonymous) @ ember.debug.js:43826
dispatch @ VM229 jquery.js:4670
elemData.handle @ VM229 jquery.js:4338
trigger @ VM229 jquery.js:4579
simulate @ VM229 jquery.js:4906
handler @ VM229 jquery.js:5169
clear @ ember.debug.js:916
reset @ ember.debug.js:916
handleException @ ember.debug.js:1070
handleException @ ember.debug.js:1071
_throw @ ember.debug.js:1070
evaluate @ ember.debug.js:862
execute @ ember.debug.js:1070
rerender @ ember.debug.js:1057
_this.render @ ember.debug.js:13523
runInTransaction @ ember.debug.js:24861
_renderRoots @ ember.debug.js:13784
_renderRootsTransaction @ ember.debug.js:13822
_revalidate @ ember.debug.js:13861
invoke @ ember.debug.js:1902
flush @ ember.debug.js:1970
flush @ ember.debug.js:2094
end @ ember.debug.js:2164
run @ ember.debug.js:2287
run @ ember.debug.js:24085
handler @ ember.debug.js:13301
(anonymous) @ ember.debug.js:43827
dispatch @ VM229 jquery.js:4670
elemData.handle @ VM229 jquery.js:4338
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (12 by maintainers)
Commits related to this issue
- let canary fail until https://github.com/emberjs/ember.js/issues/14888 is fixed — committed to nypublicradio/nypr-account-settings by deleted user 7 years ago
- [wip] trying to create a failing test for #14888 — committed to intercom/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] fix #14888 with a guard — committed to intercom/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] fix #14888 with a guard — committed to intercom/ember.js by GavinJoyce 7 years ago
- Merge pull request #14890 from intercom/gj/fix-#14888 [BUGFIX beta] fix #14888 with a guard — committed to emberjs/ember.js by rwjblue 7 years ago
- [BUGFIX beta] test to prevent regression of #14888 — committed to intercom/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] test to prevent regression of #14888 — committed to intercom/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] test to prevent regression of #14888 — committed to intercom/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] fix #14888 with a guard (cherry picked from commit 75fed9b45992287b6518283e77b4f703c535dd7c) — committed to emberjs/ember.js by GavinJoyce 7 years ago
- [BUGFIX beta] test to prevent regression of #14888 — committed to devdesai/ember.js by ddzenefits 7 years ago
- [BUGFIX beta] test to prevent regression of #14888 use focus in better code — committed to devdesai/ember.js by ddzenefits 7 years ago
- Merge pull request #15080 from devdesai/dd_test_for_14888 add a test to prevent regression of #14888 — committed to emberjs/ember.js by mmun 7 years ago
It looks like this guard is needed:
I’m working on a test now