We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b8e477 commit c2454a0Copy full SHA for c2454a0
src/node.js
@@ -668,7 +668,7 @@ var posix = posixModule.exports;
668
var pathModule = createInternalModule("path", function (exports) {
669
exports.join = function () {
670
var joined = "",
671
- dotre = /^\.\//g,
+ dotre = /^\.\//,
672
dotreplace = "",
673
dotdotre = /(^|(\/)([^\/]+\/)?)\.\.\//g,
674
dotdotreplace = ""
@@ -677,7 +677,7 @@ var pathModule = createInternalModule("path", function (exports) {
677
678
/* Some logic to shorten paths */
679
if (part === ".") continue;
680
- while (dotre.exec(part)) part.replace(dotre, dotreplace);
+ while (dotre.exec(part)) part = part.replace(dotre, dotreplace);
681
682
if (i === 0) {
683
part = part.replace(/\/*$/, "/");
0 commit comments