diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2023-08-29 12:18:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-29 12:18:25 +0900 |
commit | fb7092fb43d5a6e5a29ca5b2f0de6683ee55f3e5 (patch) | |
tree | b6d5107ac7a4c800fbd915e9041296aa113a7d12 /ext/node/polyfills | |
parent | bd034e360d036d9634d8526a6eea73979b3ad9e1 (diff) |
fix(ext/node): fix argv[1] in Worker (#20305)
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r-- | ext/node/polyfills/process.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index c7c22b562..64a3ef31b 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -873,7 +873,7 @@ internals.__bootstrapNodeProcess = function ( // Overwrites the 2st item with getter. Object.defineProperty(argv, "1", { get: () => { - if (Deno.mainModule.startsWith("file:")) { + if (Deno.mainModule?.startsWith("file:")) { return pathFromURL(new URL(Deno.mainModule)); } else { return join(Deno.cwd(), "$deno$node.js"); |