Skip to content

Commit 472e11d

Browse files
arturgawlikaduh95
authored andcommitted
doc: fix not working code example in vm docs
PR-URL: #60224 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent ebe3bef commit 472e11d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/vm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ function resolveAndLinkDependencies(module) {
485485
// The "secret" variable refers to the global variable we added to
486486
// "contextifiedObject" when creating the context.
487487
export default secret;
488-
`, { context: referencingModule.context });
489-
moduleMap.set(specifier, linkedModule);
488+
`, { context: module.context });
489+
moduleMap.set(specifier, requestedModule);
490490
// Resolve the dependencies of the new module as well.
491491
resolveAndLinkDependencies(requestedModule);
492492
}
@@ -566,8 +566,8 @@ const contextifiedObject = vm.createContext({
566566
// The "secret" variable refers to the global variable we added to
567567
// "contextifiedObject" when creating the context.
568568
export default secret;
569-
`, { context: referencingModule.context });
570-
moduleMap.set(specifier, linkedModule);
569+
`, { context: module.context });
570+
moduleMap.set(specifier, requestedModule);
571571
// Resolve the dependencies of the new module as well.
572572
resolveAndLinkDependencies(requestedModule);
573573
}

0 commit comments

Comments
 (0)