Skip to content

Commit

Permalink
module: refactor to use more primordials
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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>
  • Loading branch information
aduh95 authored and cjihrig committed Dec 8, 2020
1 parent fdc4b03 commit 0de2b64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const {
ArrayPrototypePush,
ArrayPrototypeSlice,
ArrayPrototypeSplice,
ArrayPrototypeUnshift,
Boolean,
Error,
JSONParse,
Expand Down Expand Up @@ -1227,8 +1228,8 @@ Module._initPaths = function() {
let paths = [path.resolve(prefixDir, 'lib', 'node')];

if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
paths.unshift(path.resolve(homeDir, '.node_modules'));
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries'));
ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_modules'));
}

if (nodePath) {
Expand Down

0 comments on commit 0de2b64

Please sign in to comment.