From 817f6f537891a78fe3dbecbbe507d3991c1c4a56 Mon Sep 17 00:00:00 2001 From: Trevor DeVore Date: Tue, 3 Sep 2024 12:03:05 -0500 Subject: [PATCH] Account for isDestroying state on InfinityLoaderComponent If the `InfinityLoaderComponent` has already had `destroy` called then `infinityMomdel` will be `null`. --- ember-infinity/src/components/infinity-loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ember-infinity/src/components/infinity-loader.js b/ember-infinity/src/components/infinity-loader.js index 3e2874f0..7affc138 100644 --- a/ember-infinity/src/components/infinity-loader.js +++ b/ember-infinity/src/components/infinity-loader.js @@ -177,7 +177,7 @@ export default class InfinityLoaderComponent extends Component { this._cancelTimers(); this.infinityModelContent.then((infinityModel) => { - if (!this.isDestroyed) { + if (!this.isDestroyed && !this.isDestroying) { infinityModel.off( 'infinityModelLoaded', this,