Skip to content

Commit 878907d

Browse files
aduh95targos
authored andcommittedMay 16, 2021
module: refactor to use more primordials
PR-URL: #36348 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent aa23776 commit 878907d

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)
Please sign in to comment.