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

Most upvoted comments

It looks like this guard is needed:

screen shot 2017-01-30 at 21 30 11

I’m working on a test now