diff --git a/src/common/TaskQueue.ts b/src/common/TaskQueue.ts index 508e5d460..6f3b40bc4 100644 --- a/src/common/TaskQueue.ts +++ b/src/common/TaskQueue.ts @@ -3,7 +3,6 @@ * @license MIT */ -import { isNode } from 'common/Platform'; import type { ILogService } from 'common/services/Services'; interface ITaskQueue { @@ -148,7 +147,7 @@ class IdleTaskQueueInternal extends TaskQueue { * This reverts to a {@link PriorityTaskQueue} if the environment does not support idle callbacks. */ // eslint-disable-next-line @typescript-eslint/naming-convention -export const IdleTaskQueue = (!isNode && 'requestIdleCallback' in window) ? IdleTaskQueueInternal : PriorityTaskQueue; +export const IdleTaskQueue = ('requestIdleCallback' in globalThis) ? IdleTaskQueueInternal : PriorityTaskQueue; /** * An object that tracks a single debounced task that will run on the next idle frame. When called