We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a290ddf commit 784b367Copy full SHA for 784b367
lib/url.js
@@ -852,7 +852,7 @@ Url.prototype.resolveObject = function(relative) {
852
// strip single dots, resolve double dots to parent dir
853
// if the path tries to go above the root, `up` ends up > 0
854
var up = 0;
855
- for (var i = srcPath.length; i >= 0; i--) {
+ for (var i = srcPath.length - 1; i >= 0; i--) {
856
last = srcPath[i];
857
if (last === '.') {
858
spliceOne(srcPath, i);
0 commit comments