From b0c53c297cb2a564ee8fd4b90b9b944b352fd3ef Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Thu, 14 Feb 2019 00:48:44 -0800 Subject: [PATCH] fix(scheduler): join current run loop if possible --- addon/scheduler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/scheduler.js b/addon/scheduler.js index b695375..e226af6 100644 --- a/addon/scheduler.js +++ b/addon/scheduler.js @@ -1,5 +1,5 @@ import { Scheduler, Subscription } from "rxjs"; -import { cancel, later, run } from "@ember/runloop"; +import { cancel, later, join } from "@ember/runloop"; class RunLoopAction extends Subscription { constructor(scheduler, work) { @@ -13,7 +13,7 @@ class RunLoopAction extends Subscription { if (delay) { this.timer = later(this, this.work, state, delay); } else { - run(this, this.work, state); + join(this, this.work, state); } return this;