Skip to content

Commit

Permalink
Use requireFromInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
richie0866 committed Jul 1, 2021
1 parent 805cf50 commit 9deb9f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class Package {
public async require(module: ModuleScript): Promise<ReturnType<Executor>> {
assert(classIs(module, "ModuleScript"), `(Package.require) '${module}' must be a module`);
assert(module.IsDescendantOf(this.tree), `(Package.require) '${module}' must be a descendant of Package.tree`);
return VirtualScript.loadModule(module);
return VirtualScript.requireFromInstance(module);
}

/**
Expand Down

0 comments on commit 9deb9f7

Please sign in to comment.