Skip to content

Commit 1aae572

Browse files
aduh95targos
authored andcommitted
module: refactor to use more primordials
PR-URL: #36348 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 0f6c3f7 commit 1aae572

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/modules/cjs/loader.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const {
3131
ArrayPrototypePush,
3232
ArrayPrototypeSlice,
3333
ArrayPrototypeSplice,
34+
ArrayPrototypeUnshift,
3435
Boolean,
3536
Error,
3637
JSONParse,
@@ -1204,8 +1205,8 @@ Module._initPaths = function() {
12041205
let paths = [path.resolve(prefixDir, 'lib', 'node')];
12051206

12061207
if (homeDir) {
1207-
paths.unshift(path.resolve(homeDir, '.node_libraries'));
1208-
paths.unshift(path.resolve(homeDir, '.node_modules'));
1208+
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
1209+
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
12091210
}
12101211

12111212
if (nodePath) {

0 commit comments

Comments
 (0)