From bcabe442cfe640136683729711032bdbc99a6a6e Mon Sep 17 00:00:00 2001 From: Antamansid Date: Fri, 4 Oct 2024 13:02:53 +0300 Subject: [PATCH] fix(LayersService): disconnect resizeObserver when the service is detached --- src/services/LayersService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/LayersService.ts b/src/services/LayersService.ts index 91f075e..a2b0da6 100644 --- a/src/services/LayersService.ts +++ b/src/services/LayersService.ts @@ -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; }