Skip to content

Commit

Permalink
Account for isDestroying state on InfinityLoaderComponent
Browse files Browse the repository at this point in the history
If the `InfinityLoaderComponent` has already had `destroy` called then `infinityMomdel` will be `null`.
  • Loading branch information
trevordevore authored Sep 3, 2024
1 parent 1dce72b commit 817f6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ember-infinity/src/components/infinity-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 817f6f5

Please sign in to comment.