only reply to compile action

This commit is contained in:
Iuri Matias 2018-06-04 13:33:07 -04:00
parent e96842f9da
commit 6e37c2d91b

View File

@ -54,9 +54,13 @@ class SolcW {
ipc.server.on(
'message',
function(data, socket) {
self.compile(data.message, (result) => {
ipc.server.emit(socket, 'message', {action: 'compilation', message: result});
});
if (data.action != 'compile') {
return;
}
self.compile(data.message, (result) => {
ipc.server.emit(socket, 'message', {action: 'compilation', message: result});
});
}
);
}