@superhero/http-request 4.0.4 → 4.0.5

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 +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -731,7 +731,7 @@ export default class Request
731
731
 
732
732
  #contentTypeTextEventStream(body)
733
733
  {
734
- return body.split('\n\n').map((fields) =>
734
+ return body?.trim().split('\n\n').map((fields) =>
735
735
  {
736
736
  return Object.fromEntries(fields.split('\n').map((field) =>
737
737
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/http-request",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "HTTP request component supporting HTTP 1.1 and HTTP 2.0",
5
5
  "keywords": [
6
6
  "http request",