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 67ff2d5 commit a5ddf82Copy full SHA for a5ddf82
lib/Server.js
@@ -24,12 +24,14 @@ function Server(compiler, options) {
24
this.headers = options.headers;
25
26
this.sockWrite = function(type, data) {
27
- this.sock.write(JSON.stringify({type: type, data: data}));
+ if (this.sock) {
28
+ this.sock.write(JSON.stringify({type: type, data: data}));
29
+ }
30
}
31
32
// Listening for events
33
var invalidPlugin = function() {
- if(this.sock) this.sockWrite("invalid");
34
+ this.sockWrite("invalid");
35
}.bind(this);
36
compiler.plugin("compile", invalidPlugin);
37
compiler.plugin("invalid", invalidPlugin);
0 commit comments