diff --git a/lib/modules/solidity/solcW.js b/lib/modules/solidity/solcW.js index f599f8b7..2be126f0 100644 --- a/lib/modules/solidity/solcW.js +++ b/lib/modules/solidity/solcW.js @@ -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}); + }); } ); }