Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 8dbfee5

Browse files
zcbenzcodebytere
authored andcommitted
Make Module.globalPaths a reference.
We need to hack the search paths of the require function so we can load libraries from embedded applications without modifications of node's module code. (cherry picked from commit 76ba048)
1 parent 8922715 commit 8dbfee5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/cjs/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ Module._initPaths = function() {
783783
modulePaths = paths;
784784

785785
// clone as a shallow copy, for introspection.
786-
Module.globalPaths = modulePaths.slice(0);
786+
Module.globalPaths = modulePaths;
787787
};
788788

789789
Module._preloadModules = function(requests) {

0 commit comments

Comments
 (0)