8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dependencySpecifiers
1 parent 54bb691 commit 4038cf0Copy full SHA for 4038cf0
lib/internal/vm/module.js
@@ -7,6 +7,7 @@ const {
7
ArrayPrototypeIndexOf,
8
ArrayPrototypeSome,
9
ObjectDefineProperty,
10
+ ObjectFreeze,
11
ObjectGetPrototypeOf,
12
ObjectSetPrototypeOf,
13
ReflectApply,
@@ -340,9 +341,7 @@ class SourceTextModule extends Module {
340
341
if (this[kWrap] === undefined) {
342
throw new ERR_VM_MODULE_NOT_MODULE();
343
}
- if (this[kDependencySpecifiers] === undefined) {
344
- this[kDependencySpecifiers] = this[kWrap].getStaticDependencySpecifiers();
345
- }
+ this[kDependencySpecifiers] ??= ObjectFreeze(this[kWrap].getStaticDependencySpecifiers());
346
return this[kDependencySpecifiers];
347
348
0 commit comments