[BUGFIX release]: don't render if we're mid-destroy by NullVoxPopuli · Pull Request #21002 · emberjs/ember.js
This change fixes an issue discovered by @btecu:
not ok 17 Chrome 142.0 - [73 ms] - Integration | Component | x-select: it works with multiple components on the same page
---
stack: >
Error: Attempted to associate a destroyable child with an object that is already destroying or destroyed
at associateDestroyableChild (http://localhost:7357/assets/app-CDeM15aH.js:1776:35)
at TryOpcode.handleException (http://localhost:7357/assets/app-CDeM15aH.js:28359:5)
at UpdatingVMFrame.handleException (http://localhost:7357/assets/app-CDeM15aH.js:28498:52)
at UpdatingVM.throw (http://localhost:7357/assets/app-CDeM15aH.js:28320:16)
at Assert.evaluate (http://localhost:7357/assets/app-CDeM15aH.js:25538:42)
at UpdatingVM._execute (http://localhost:7357/assets/app-CDeM15aH.js:28307:34)
at http://localhost:7357/assets/app-CDeM15aH.js:28290:51
at debug.runInTrackingTransaction (http://localhost:7357/assets/app-CDeM15aH.js:2413:19)
at UpdatingVM.execute (http://localhost:7357/assets/app-CDeM15aH.js:28290:15)
at RenderResultImpl.rerender (http://localhost:7357/assets/app-CDeM15aH.js:28516:8)
This would only happen in Chome and would not occur in FireFox -- but given the nature of the error message, I figure it is a problem that could show up anywhere -- we don't want our renderer to double-associate destroyable children.
I tested this change out locally on that PR and the tests pass.
An existing test started failing with this change, but I think the behavior may have been wrong.
It was a new test with the renderComponent stuff, and I've adjusted it (and the comment) to be more clear as to what I now expect.
This fix is unrelated to:
Originally PR'd here: #21001