diff --git a/src/EventSource.js b/src/EventSource.js index 6a7b146..fca961d 100644 --- a/src/EventSource.js +++ b/src/EventSource.js @@ -214,7 +214,7 @@ class EventSource { this.interval = retry; } } else if (line.startsWith('data')) { - data.push(line.replace(/data:?\s*/, '')); + data.push(line.replace(/data:?\s/, '')); } else if (line.startsWith('id')) { id = line.replace(/id:?\s*/, ''); if (id !== '') {