@nxtedition/nxt-undici 2.0.29 → 2.0.30

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 +2 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -185,7 +185,7 @@ export async function request(url, opts) {
185
185
  if (statusCode !== 101) {
186
186
  this.abort(createError(statusCode, { headers }))
187
187
  } else {
188
- this.resolve({ headers, socket })
188
+ this.resolve?.({ headers, socket })
189
189
  this.resolve = null
190
190
  }
191
191
  },
@@ -214,7 +214,7 @@ export async function request(url, opts) {
214
214
  size: Number.isFinite(contentLength) ? contentLength : null,
215
215
  })
216
216
 
217
- this.resolve(this.body)
217
+ this.resolve?.(this.body)
218
218
  this.resolve = null
219
219
  this.reject = null
220
220
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "2.0.29",
3
+ "version": "2.0.30",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",