From 22598a9ed40bdc717327018c4b6f6bbb1eb8e9f3 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Thu, 10 Nov 2022 20:21:46 +0000 Subject: [PATCH] Fix registerDestructor usage --- addon/modifiers/in-viewport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/modifiers/in-viewport.js b/addon/modifiers/in-viewport.js index 7215c63..567c433 100644 --- a/addon/modifiers/in-viewport.js +++ b/addon/modifiers/in-viewport.js @@ -28,7 +28,7 @@ if (macroCondition(dependencySatisfies('ember-modifier', '>=3.2.0 || 4.x'))) { if (!this.didSetup) { this.setupWatcher(element); - registerDestructor(() => this.destroyWatcher(element)); + registerDestructor(this, () => this.destroyWatcher(element)); } else if (this.hasStaleOptions) { this.destroyWatcher(element); this.setupWatcher(element);