mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
doc: fix not working code example in vm docs
PR-URL: https://github.com/nodejs/node/pull/60224 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
1 parent
7007f9dd65
commit
8e771632b7
1 file changed
+4
-4
+4
-4
@@ -485,8 +485,8 @@ function resolveAndLinkDependencies(module) {
|
||||
// The "secret" variable refers to the global variable we added to
|
||||
// "contextifiedObject" when creating the context.
|
||||
export default secret;
|
||||
`, { context: referencingModule.context });
|
||||
moduleMap.set(specifier, linkedModule);
|
||||
`, { context: module.context });
|
||||
moduleMap.set(specifier, requestedModule);
|
||||
// Resolve the dependencies of the new module as well.
|
||||
resolveAndLinkDependencies(requestedModule);
|
||||
}
|
||||
@@ -566,8 +566,8 @@ const contextifiedObject = vm.createContext({
|
||||
// The "secret" variable refers to the global variable we added to
|
||||
// "contextifiedObject" when creating the context.
|
||||
export default secret;
|
||||
`, { context: referencingModule.context });
|
||||
moduleMap.set(specifier, linkedModule);
|
||||
`, { context: module.context });
|
||||
moduleMap.set(specifier, requestedModule);
|
||||
// Resolve the dependencies of the new module as well.
|
||||
resolveAndLinkDependencies(requestedModule);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user