normalize-url 2.0.0 → 2.0.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 +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -142,7 +142,9 @@ module.exports = (str, opts) => {
142
142
  }
143
143
 
144
144
  // Decode query parameters
145
- urlObj.search = decodeURIComponent(urlObj.search);
145
+ if (urlObj.search !== null) {
146
+ urlObj.search = decodeURIComponent(urlObj.search);
147
+ }
146
148
 
147
149
  // Take advantage of many of the Node `url` normalizations
148
150
  str = url.format(urlObj);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "normalize-url",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Normalize a URL",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/normalize-url",