File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,8 +121,6 @@ class SourceTextModule {
121121 if ( isModuleNamespaceObject ( m ) ) {
122122 return m ;
123123 }
124- if ( ! m || ! wrapMap . has ( m ) )
125- throw new ERR_VM_MODULE_NOT_MODULE ( ) ;
126124 const childLinkingStatus = linkingStatusMap . get ( m ) ;
127125 if ( childLinkingStatus === 'errored' )
128126 throw m . error ;
Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ const {
2929} = internalBinding ( 'contextify' ) ;
3030const { callbackMap } = internalBinding ( 'module_wrap' ) ;
3131const {
32- ERR_INVALID_ARG_TYPE ,
33- ERR_VM_MODULE_NOT_MODULE ,
32+ ERR_INVALID_ARG_TYPE
3433} = require ( 'internal/errors' ) . codes ;
3534const { isModuleNamespaceObject, isArrayBufferView } = require ( 'util' ) . types ;
3635const { validateInt32, validateUint32 } = require ( 'internal/validators' ) ;
@@ -97,15 +96,12 @@ class Script extends ContextifyScript {
9796 'function' ,
9897 importModuleDynamically ) ;
9998 }
100- const { wrapMap, linkingStatusMap } =
101- require ( 'internal/vm/source_text_module' ) ;
99+ const { linkingStatusMap } = require ( 'internal/vm/source_text_module' ) ;
102100 callbackMap . set ( this , { importModuleDynamically : async ( ...args ) => {
103101 const m = await importModuleDynamically ( ...args ) ;
104102 if ( isModuleNamespaceObject ( m ) ) {
105103 return m ;
106104 }
107- if ( ! m || ! wrapMap . has ( m ) )
108- throw new ERR_VM_MODULE_NOT_MODULE ( ) ;
109105 const childLinkingStatus = linkingStatusMap . get ( m ) ;
110106 if ( childLinkingStatus === 'errored' )
111107 throw m . error ;
You can’t perform that action at this time.
0 commit comments