@nxtedition/nxt-undici 4.0.1 → 4.0.2

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.
@@ -7,15 +7,14 @@ export default (opts) => (dispatch) => (opts, handler) => {
7
7
  const body = opts.body({ signal: opts.signal })
8
8
 
9
9
  if (typeof body?.then === 'function') {
10
- body.then(
11
- (body) => {
10
+ body
11
+ .then((body) => {
12
12
  dispatch({ ...opts, body }, handler)
13
- },
14
- (err) => {
13
+ })
14
+ .catch((err) => {
15
15
  handler.onConnect(() => {})
16
16
  handler.onError(err)
17
- },
18
- )
17
+ })
19
18
  return true
20
19
  } else {
21
20
  return dispatch({ ...opts, body }, handler)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",