提交 b2418662 编写于 作者: P Pavel Kolev

Fix sending message to terminated worker

上级 4d976f08
......@@ -227,7 +227,9 @@ export class WorkerClient {
}
private _postMessage(msg:any): void {
this._worker.postMessage(stringify(msg));
if (this._worker) {
this._worker.postMessage(stringify(msg));
}
}
private _onSerializedMessage(msg:string): void {
......
......@@ -41,7 +41,9 @@ class WebWorker implements IWorker {
}
public postMessage(msg:string): void {
this.worker.postMessage(msg);
if (this.worker) {
this.worker.postMessage(msg);
}
}
public dispose(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册