Skip to content

Commit f0e8e64

Browse files
committed
fix data detection
1 parent da403f7 commit f0e8e64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sse/sse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (s *Stream) Send(msg Message) error {
7676
w([]byte(msg.Event))
7777
w([]byte{'\n'})
7878
}
79-
if msg.Data.Status != 0 {
79+
if msg.Data.Data != nil || len(msg.Data.Errors) != 0 {
8080
w([]byte("data: "))
8181
raw, err := json.Marshal(msg.Data)
8282
if err != nil {

0 commit comments

Comments
 (0)