fetch-event-source
fetch-event-source copied to clipboard
Empty string was return when the event data is a `'\n'`
trafficstars
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 So it would seem.
is there any solution for this issue here yet?