Use concat for paths

This commit is contained in:
Jonathan Clem committed 2021-04-21 17:02:53 -04:00
1 parent c1c139b0ab
commit ade5cea985
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -2467,7 +2467,9 @@ const wrapRequire = new Proxy(require, {
return target.apply(thisArg, [moduleID]);
}
catch (err) {
return target.resolve(moduleID, { paths: [...module.paths, process.cwd()] });
return target.resolve(moduleID, {
paths: module.paths.concat(process.cwd())
});
}
},
get: (target, prop, receiver) => {