File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ const { getOptionValue } = require('internal/options');
9494
9595let emittedSpecifierResolutionWarning = false ;
9696
97- const nullTypeForErr = { constructor : { name : 'null' } } ;
98-
9997/**
10098 * A utility function to iterate through a hook chain, track advancement in the
10199 * chain, and generate and supply the `next<HookName>` argument to the custom
@@ -608,7 +606,7 @@ class ESMLoader {
608606 throw new ERR_INVALID_RETURN_VALUE (
609607 'an object' ,
610608 hookErrIdentifier ,
611- output === null ? nullTypeForErr : output ,
609+ output ,
612610 ) ;
613611 }
614612 } ;
@@ -844,7 +842,7 @@ class ESMLoader {
844842 throw new ERR_INVALID_RETURN_VALUE (
845843 'an object' ,
846844 hookErrIdentifier ,
847- output === null ? nullTypeForErr : output ,
845+ output ,
848846 ) ;
849847 }
850848 } ;
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ const commonArgs = [
332332 assert . match ( stderr , / l o a d e r - r e s o l v e - n u l l - r e t u r n \. m j s / ) ;
333333 assert . match ( stderr , / ' r e s o l v e ' h o o k ' s n e x t R e s o l v e \( \) / ) ;
334334 assert . match ( stderr , / a n o b j e c t / ) ;
335- assert . match ( stderr , / i n s t a n c e o f n u l l / ) ;
335+ assert . match ( stderr , / g o t n u l l / ) ;
336336}
337337
338338{ // Verify error thrown when invalid `context` argument passed to `nextResolve`
@@ -372,7 +372,7 @@ const commonArgs = [
372372 assert . match ( stderr , / l o a d e r - l o a d - n u l l - r e t u r n \. m j s / ) ;
373373 assert . match ( stderr , / ' l o a d ' h o o k ' s n e x t L o a d \( \) / ) ;
374374 assert . match ( stderr , / a n o b j e c t / ) ;
375- assert . match ( stderr , / i n s t a n c e o f n u l l / ) ;
375+ assert . match ( stderr , / g o t n u l l / ) ;
376376}
377377
378378{ // Verify error thrown when invalid `url` argument passed to `nextLoad`
You can’t perform that action at this time.
0 commit comments