diff --git a/lib/ace/worker/worker_client.js b/lib/ace/worker/worker_client.js index 7c7be791738..1bd54ffcb05 100644 --- a/lib/ace/worker/worker_client.js +++ b/lib/ace/worker/worker_client.js @@ -171,7 +171,7 @@ var WorkerClient = function(worker) { // TODO: cleanup event if (data.data && data.data.err) data.data.err = {message: data.data.err.message, stack: data.data.err.stack, code: data.data.err.code}; - this.$worker.postMessage({event: event, data: {data: data.data}}); + this.$worker && this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { console.error(ex.stack);