@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.
- package/index.js +1 -1
- 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
|
{
|