Skip to content

Commit cc18907

Browse files
aduh95danielleadams
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 8dadaa6 commit cc18907

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/modules/cjs/loader.js

Lines changed: 3 additions & 2 deletions
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,
@@ -1227,8 +1228,8 @@ Module._initPaths = function() {
12271228
let paths = [path.resolve(prefixDir, 'lib', 'node')];
12281229

12291230
if (homeDir) {
1230-
paths.unshift(path.resolve(homeDir, '.node_libraries'));
1231-
paths.unshift(path.resolve(homeDir, '.node_modules'));
1231+
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
1232+
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
12321233
}
12331234

12341235
if (nodePath) {

0 commit comments

Comments
 (0)