fetch-event-source icon indicating copy to clipboard operation
fetch-event-source copied to clipboard

Empty string was return when the event data is a `'\n'`

Open lxmfly123 opened this issue 2 years ago • 5 comments
trafficstars

lxmfly123 avatar Jul 07 '23 08:07 lxmfly123

When server just sends '\n' among other events, the parsed event.data is just a empty string ''. For example:

from server:

[{id:1,data:'a'}, {id:2,data:'\n'}, {id:1,data:'c'}, ]

parsed messages:

[{id:1,data:'a'}, {id:2,data:''}, {id:1,data:'c'}, ]

the second parsed event data is different from server's.

lxmfly123 avatar Jul 07 '23 08:07 lxmfly123

这个库似乎没人管的样子

lxmfly123 avatar Jul 07 '23 11:07 lxmfly123

@lxmfly123 So it would seem.

peterdresslar avatar Sep 12 '23 05:09 peterdresslar

is there any solution for this issue here yet?

att1106 avatar Apr 10 '24 16:04 att1106