Skip to content

Commit b047e56

Browse files
CR feedback
1 parent e52919f commit b047e56

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/internal/modules/esm/loader.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ function nextHookFactory(chain, meta, { validateArgs, validateOutput }) {
179179
*/
180180
class ESMLoader {
181181
#hooks = {
182-
__proto__: null,
183182
/**
184183
* Prior to ESM loading. These are called once before any modules are started.
185184
* @private
186185
* @property {KeyedHook[]} globalPreload Last-in-first-out list of preload hooks.
187186
*/
188187
globalPreload: [],
188+
189189
/**
190-
* Phase 2 of 2 in ESM loading.
190+
* Phase 2 of 2 in ESM loading (phase 2 is below).
191191
* @private
192192
* @property {KeyedHook[]} load Last-in-first-out collection of loader hooks.
193193
*/
@@ -197,6 +197,7 @@ class ESMLoader {
197197
url: 'node:internal/modules/esm/load',
198198
},
199199
],
200+
200201
/**
201202
* Phase 1 of 2 in ESM loading.
202203
* @private
@@ -412,10 +413,10 @@ class ESMLoader {
412413
if (this.#hooks.load.length !== 1) {
413414
// We can skip cloning if there are no user-provided loaders because
414415
// the Node.js default resolve hook does not use import assertions.
415-
importAssertionsForResolve = ObjectAssign(
416-
{ __proto__: null },
417-
importAssertions,
418-
);
416+
importAssertionsForResolve = {
417+
__proto__: null,
418+
...importAssertions,
419+
};
419420
}
420421

421422
const { format, url } =

0 commit comments

Comments
 (0)