summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/process.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/process.ts')
-rw-r--r--ext/node/polyfills/process.ts2
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");