diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts index 49f2f3e3e8..8ca08fe7ba 100644 --- a/ext/node/polyfills/worker_threads.ts +++ b/ext/node/polyfills/worker_threads.ts @@ -177,7 +177,7 @@ class NodeWorker extends EventEmitter { StringPrototypeToString(specifier), ".mjs", )) || - (pkg && pkg.exists && pkg.typ == "module") + (pkg && pkg.exists && pkg.typ !== "module") ) { const cwdFileUrl = toFileUrl(Deno.cwd()); specifier =