normalize-url 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -98,9 +98,8 @@ module.exports = function (str, opts) {
98
98
 
99
99
  if (testParameter(lastComponent, opts.removeDirectoryIndex)) {
100
100
  pathComponents = pathComponents.slice(0, pathComponents.length - 1);
101
+ urlObj.pathname = pathComponents.slice(1).join('/') + '/';
101
102
  }
102
-
103
- urlObj.pathname = pathComponents.slice(1).join('/') + '/';
104
103
  }
105
104
 
106
105
  // resolve relative paths, but only for slashed protocols
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "normalize-url",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Normalize a URL",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/normalize-url",