Skip to content

Commit 9c7c163

Browse files
authored
Merge pull request #5776 from Gaubee/fix/headless-bun-deno-compat
Fix @xterm/headless compatibility with Bun and Deno runtimes
2 parents 8674bc5 + aa7716a commit 9c7c163

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/common/TaskQueue.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* @license MIT
44
*/
55

6-
import { isNode } from 'common/Platform';
76
import type { ILogService } from 'common/services/Services';
87

98
interface ITaskQueue {
@@ -148,7 +147,7 @@ class IdleTaskQueueInternal extends TaskQueue {
148147
* This reverts to a {@link PriorityTaskQueue} if the environment does not support idle callbacks.
149148
*/
150149
// eslint-disable-next-line @typescript-eslint/naming-convention
151-
export const IdleTaskQueue = (!isNode && 'requestIdleCallback' in window) ? IdleTaskQueueInternal : PriorityTaskQueue;
150+
export const IdleTaskQueue = ('requestIdleCallback' in globalThis) ? IdleTaskQueueInternal : PriorityTaskQueue;
152151

153152
/**
154153
* An object that tracks a single debounced task that will run on the next idle frame. When called

0 commit comments

Comments
 (0)