Skip to content

Commit

Permalink
fix: main thread check in deno 2 (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
congzhangzh authored Oct 14, 2024
1 parent 923c06c commit 0060b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ffi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function unload() {

// Automatically run the preload if we're on windows and on the main thread.
if (Deno.build.os === "windows") {
if ((self as never)["window"]) {
if (self === globalThis) {
await preload();
} else if (!await checkForWebView2Loader()) {
throw new Error(
Expand Down

0 comments on commit 0060b06

Please sign in to comment.