Преглед на файлове

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

Pranomvignesh преди 4 години
родител
ревизия
ad78615d47
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      src/workerManager.ts

+ 3 - 1
src/workerManager.ts

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