| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 76968ab commit c621491
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -350,7 +350,9 @@ class BuiltinModule { | |||
| 350 | 350 | const url = `node:${this.id}`; | |
| 351 | 351 | const builtin = this; | |
| 352 | 352 | const exportsKeys = ArrayPrototypeSlice(this.exportKeys); | |
| 353 | - ArrayPrototypePush(exportsKeys, 'default'); | ||
| 353 | + if (!ArrayPrototypeIncludes(exportsKeys, 'default')) { | ||
| 354 | + ArrayPrototypePush(exportsKeys, 'default'); | ||
| 355 | + } | ||
| 354 | 356 | this.module = new ModuleWrap( | |
| 355 | 357 | url, undefined, exportsKeys, | |
| 356 | 358 | function() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,8 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('node:assert'); | ||
| 4 | + | ||
| 5 | + process.default = 1; | ||
| 6 | + import('node:process').then(common.mustCall((processModule) => { | ||
| 7 | + assert.strictEqual(processModule.default.default, 1); | ||
| 8 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments