@nxtedition/nxt-undici 4.1.0 → 4.1.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/lib/index.js +1 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -103,7 +103,7 @@ export async function request(url, opts) {
103
103
  } else if (url instanceof URL) {
104
104
  opts = { url, ...opts }
105
105
  } else if (typeof url.origin === 'string' && typeof (url.path ?? url.pathname) === 'string') {
106
- opts = { url, ...opts }
106
+ opts = opts ? { ...url, ...opts } : url
107
107
  }
108
108
 
109
109
  if (opts == null && typeof url === 'object' && url != null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",