We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf1b23 commit a9d16b3Copy full SHA for a9d16b3
src/watch.ts
@@ -121,12 +121,16 @@ export class Watch {
121
stream.on('error', doneCallOnce);
122
stream.on('close', () => doneCallOnce(null));
123
stream.on('data', (line) => {
124
+ let data;
125
+
126
try {
- const data = JSON.parse(line);
- callback(data.type, data.object, data);
127
+ data = JSON.parse(line);
128
} catch (ignore) {
129
// ignore parse errors
130
+ return;
131
}
132
133
+ callback(data.type, data.object, data);
134
});
135
136
req.pipe(stream);
0 commit comments