query-string 3.0.2 → 3.0.3

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 +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,7 +29,7 @@ exports.parse = function (str) {
29
29
  // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
30
30
  val = val === undefined ? null : decodeURIComponent(val);
31
31
 
32
- if (!ret[key]) {
32
+ if (!ret.hasOwnProperty(key)) {
33
33
  ret[key] = val;
34
34
  } else if (Array.isArray(ret[key])) {
35
35
  ret[key].push(val);
@@ -38,7 +38,7 @@ exports.parse = function (str) {
38
38
  }
39
39
 
40
40
  return ret;
41
- }, Object.create(null));
41
+ }, {});
42
42
  };
43
43
 
44
44
  exports.stringify = function (obj) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "query-string",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Parse and stringify URL query strings",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/query-string",