Skip to content

Commit 4a4f89c

Browse files
committed
y
1 parent 28b842c commit 4a4f89c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)