Skip to content

Commit 0060b06

Browse files
authored
fix: main thread check in deno 2 (#177)
1 parent 923c06c commit 0060b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ffi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function unload() {
8888

8989
// Automatically run the preload if we're on windows and on the main thread.
9090
if (Deno.build.os === "windows") {
91-
if ((self as never)["window"]) {
91+
if (self === globalThis) {
9292
await preload();
9393
} else if (!await checkForWebView2Loader()) {
9494
throw new Error(

0 commit comments

Comments
 (0)