From b8c01272f4ca3a679dd6e4084d78cf343a637442 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 1 Jul 2021 15:42:07 +0530 Subject: [PATCH] remove listener on dispose Signed-off-by: RMidhunSuresh --- src/platform/web/Platform.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/web/Platform.js b/src/platform/web/Platform.js index 3d89be9a..49a90dd5 100644 --- a/src/platform/web/Platform.js +++ b/src/platform/web/Platform.js @@ -191,6 +191,7 @@ export class Platform { } } this._container.addEventListener("error", handleAvatarError, true); + this._disposables.track(() => this._container.removeEventListener("error", handleAvatarError, true)); window.__hydrogenViewModel = vm; const view = new RootView(vm); this._container.appendChild(view.mount());