query-string 9.4.0 → 9.4.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/base.js +1 -1
  2. package/package.json +1 -1
package/base.js CHANGED
@@ -571,7 +571,7 @@ export function stringifyUrl(object, options) {
571
571
 
572
572
  let hash = getHash(object.url);
573
573
  if (typeof object.fragmentIdentifier === 'string') {
574
- const urlObjectForFragmentEncode = new URL(url);
574
+ const urlObjectForFragmentEncode = new URL(url, 'https://query-string.invalid');
575
575
  urlObjectForFragmentEncode.hash = object.fragmentIdentifier;
576
576
  hash = options[encodeFragmentIdentifier] ? urlObjectForFragmentEncode.hash : `#${object.fragmentIdentifier}`;
577
577
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "query-string",
3
- "version": "9.4.0",
3
+ "version": "9.4.1",
4
4
  "description": "Parse and stringify URL query strings",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/query-string",