Commit aa7716a
Fix @xterm/headless compatibility with Bun and Deno runtimes
Replace `window` with `globalThis` in IdleTaskQueue export.
In Bun and Deno, `isNode` is false but `window` is undefined, causing
a ReferenceError. Using `globalThis` is safe in all JS runtimes and
makes the `isNode` guard unnecessary.
This is the only `in window` expression in code bundled into
@xterm/headless.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1432e20 commit aa7716a
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
151 | | - | |
| 150 | + | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
0 commit comments