File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
596596 return this . canLoadRecur ( false ) ;
597597 }
598598
599- private canLoadRecur ( isPreload : boolean , range = parseRange ( "" ) ) {
599+ private canLoadRecur ( isPreload : boolean , range ?: string | undefined ) {
600600 if ( this . isLoaded ( ) ) {
601601 return true ;
602602 }
@@ -607,7 +607,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
607607 if ( ! isPreload && ! this . mixinsLoaded && this . metadata . hasMixins ) {
608608 throw `can't load \`${ this . getModuleIdentifier ( ) } \` because it has unloaded mixins` ;
609609 }
610- if ( ! this . canLoad ( ) || ! satisfies ( parse ( this . version ) , range ) ) {
610+ if ( ! this . canLoad ( ) || ( range && ! satisfies ( parse ( this . version ) , parseRange ( range ) ) ) ) {
611611 throw `can't load \`${ this . getModuleIdentifier ( ) } \` because it is not enabled, installed, or satisfies the range \`${ range } \`` ;
612612 }
613613
@@ -616,7 +616,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
616616 ) {
617617 const module = RootModule . INSTANCE . getDescendant ( dependency )
618618 ?. getEnabledInstance ( ) ;
619- if ( ! module ?. canLoadRecur ( isPreload , parseRange ( range ) ) ) {
619+ if ( ! module ?. canLoadRecur ( isPreload , range ) ) {
620620 return false ;
621621 }
622622 }
You can’t perform that action at this time.
0 commit comments