Move some status attributes at constructor begin
[e-mobility-charging-stations-simulator.git] / src / charging-station / Bootstrap.ts
index 37cd1e64d2693ae99436137aebe32df5a7cfe46e..d0c4016291c699c1433104f9448a5670cf5e7e41 100644 (file)
@@ -35,7 +35,7 @@ const noChargingStationTemplatesExitCode = 2;
 
 export class Bootstrap {
   private static instance: Bootstrap | null = null;
-  private workerImplementation: WorkerAbstract<ChargingStationWorkerData> | null = null;
+  private workerImplementation: WorkerAbstract<ChargingStationWorkerData> | null;
   private readonly uiServer!: AbstractUIServer;
   private readonly storage!: Storage;
   private numberOfChargingStationTemplates!: number;
@@ -47,6 +47,7 @@ export class Bootstrap {
 
   private constructor() {
     this.started = false;
+    this.workerImplementation = null;
     this.workerScript = path.join(
       path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'),
       'charging-station',