go.tree.EntityLoader.doRequest renders child nodes in the callback of an async entityStore.query → get round-trip. If the node is collapsed, removed, or the tree is destroyed before that resolves, handleResponse runs against a dead node and throws. Add a guard that verifies the node and its tree still exist before rendering, and clears the loading flag on the early-out.
go.tree.EntityLoader.doRequest renders child nodes in the callback of an async entityStore.query → get round-trip. If the node is collapsed, removed, or the tree is destroyed before that resolves, handleResponse runs against a dead node and throws. Add a guard that verifies the node and its tree still exist before rendering, and clears the loading flag on the early-out.