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>
596
596
return this . canLoadRecur ( false ) ;
597
597
}
598
598
599
- private canLoadRecur ( isPreload : boolean , range = parseRange ( "" ) ) {
599
+ private canLoadRecur ( isPreload : boolean , range ?: string | undefined ) {
600
600
if ( this . isLoaded ( ) ) {
601
601
return true ;
602
602
}
@@ -607,7 +607,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
607
607
if ( ! isPreload && ! this . mixinsLoaded && this . metadata . hasMixins ) {
608
608
throw `can't load \`${ this . getModuleIdentifier ( ) } \` because it has unloaded mixins` ;
609
609
}
610
- if ( ! this . canLoad ( ) || ! satisfies ( parse ( this . version ) , range ) ) {
610
+ if ( ! this . canLoad ( ) || ( range && ! satisfies ( parse ( this . version ) , parseRange ( range ) ) ) ) {
611
611
throw `can't load \`${ this . getModuleIdentifier ( ) } \` because it is not enabled, installed, or satisfies the range \`${ range } \`` ;
612
612
}
613
613
@@ -616,7 +616,7 @@ export class ModuleInstance extends ModuleInstanceBase<Module>
616
616
) {
617
617
const module = RootModule . INSTANCE . getDescendant ( dependency )
618
618
?. getEnabledInstance ( ) ;
619
- if ( ! module ?. canLoadRecur ( isPreload , parseRange ( range ) ) ) {
619
+ if ( ! module ?. canLoadRecur ( isPreload , range ) ) {
620
620
return false ;
621
621
}
622
622
}
You can’t perform that action at this time.
0 commit comments