Skip to content

Commit

Permalink
Merge pull request #1 from gravity-ui/fix(LayersService)_disconnect_o…
Browse files Browse the repository at this point in the history
…bserver_with_detach

fix(LayersService): disconnect resizeObserver when the service is detached
  • Loading branch information
Antamansid authored Oct 4, 2024
2 parents d5e0fd1 + bcabe44 commit 3e2bfb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/LayersService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@ export class Layers extends Emitter {
});

this.attached = false;
this.handleRootResize.cancel();
this.resizeObserver.disconnect();
}

this.handleRootResize.cancel();
this.resizeObserver.disconnect();

if (full) {
this.$root = undefined;
}
Expand Down

0 comments on commit 3e2bfb7

Please sign in to comment.