File tree 3 files changed +4
-5
lines changed
3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 5
5
ArrayPrototypePush,
6
6
FunctionPrototypeCall,
7
7
ObjectAssign,
8
- ObjectCreate,
9
8
ObjectDefineProperty,
10
9
ObjectSetPrototypeOf,
11
10
SafeSet,
@@ -255,7 +254,7 @@ class Hooks {
255
254
async resolve (
256
255
originalSpecifier ,
257
256
parentURL ,
258
- importAssertions = ObjectCreate ( null ) ,
257
+ importAssertions = { __proto__ : null } ,
259
258
) {
260
259
const isMain = parentURL === undefined ;
261
260
@@ -522,7 +521,7 @@ function pluckHooks({
522
521
transformSource,
523
522
} ) {
524
523
const obsoleteHooks = [ ] ;
525
- const acceptedHooks = ObjectCreate ( null ) ;
524
+ const acceptedHooks = { __proto__ : null } ;
526
525
527
526
if ( getGlobalPreloadCode ) {
528
527
globalPreload ??= getGlobalPreloadCode ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ async function getSource(url, context) {
70
70
* @param {object } context
71
71
* @returns {object }
72
72
*/
73
- async function defaultLoad ( url , context ) {
73
+ async function defaultLoad ( url , context = { } ) {
74
74
let responseURL = url ;
75
75
const { importAssertions } = context ;
76
76
let {
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ class ESMLoader {
317
317
* @param {object } context Metadata about the module
318
318
* @returns {Promise<{ format: ModuleFormat, source: ModuleSource }> }
319
319
*/
320
- async load ( url , context = { } ) {
320
+ async load ( url , context ) {
321
321
let loadResult ;
322
322
if ( this . #hooks) {
323
323
loadResult = await this . #hooks. load ( url , context ) ;
You can’t perform that action at this time.
0 commit comments