From 733807b2aa72daca1245df86e688627cf6579675 Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Thu, 3 May 2018 09:27:26 -0700 Subject: [PATCH] Asap scheduler id fix (#3610) * feat(schedulers): `scheduled` and `active` properties deprecated related #3572 * fix(asapScheduler): scheduled property always greater than 1 fixes #3572 --- src/internal/scheduler/AsyncScheduler.ts | 2 ++ src/internal/util/Immediate.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/internal/scheduler/AsyncScheduler.ts b/src/internal/scheduler/AsyncScheduler.ts index 0985eeb310..aad77eaadc 100644 --- a/src/internal/scheduler/AsyncScheduler.ts +++ b/src/internal/scheduler/AsyncScheduler.ts @@ -11,6 +11,7 @@ export class AsyncScheduler extends Scheduler { * A flag to indicate whether the Scheduler is currently executing a batch of * queued actions. * @type {boolean} + * @deprecated internal use only */ public active: boolean = false; /** @@ -18,6 +19,7 @@ export class AsyncScheduler extends Scheduler { * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and * others. * @type {any} + * @deprecated internal use only */ public scheduled: any = undefined; diff --git a/src/internal/util/Immediate.ts b/src/internal/util/Immediate.ts index 02ca7598bd..161270706d 100644 --- a/src/internal/util/Immediate.ts +++ b/src/internal/util/Immediate.ts @@ -1,4 +1,4 @@ -let nextHandle = 0; +let nextHandle = 1; const tasksByHandle: { [handle: string]: () => void } = {};