Explorar o código

fix(workerManager.js) : Added a check for the existence of the worker before calling withSyncedResources

Pranomvignesh %!s(int64=4) %!d(string=hai) anos
pai
achega
ad78615d47
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/workerManager.ts

+ 3 - 1
src/workerManager.ts

@@ -80,7 +80,9 @@ export class WorkerManager {
 				_client = client;
 				_client = client;
 			})
 			})
 			.then((_) => {
 			.then((_) => {
-				return this._worker.withSyncedResources(resources);
+				if (this._worker) {
+					return this._worker.withSyncedResources(resources);
+				}
 			})
 			})
 			.then((_) => _client);
 			.then((_) => _client);
 	}
 	}