Optimize energy active register calculation
[e-mobility-charging-stations-simulator.git] / src / charging-station / Bootstrap.ts
index bc0f87d7fba0f7d20ea5cab784c7bd0fd369f3c4..8734ed2284b38c5c0e8706cbb86e8afa013c1d0c 100644 (file)
@@ -53,12 +53,11 @@ export class Bootstrap {
       'ChargingStationWorker' + path.extname(fileURLToPath(import.meta.url))
     );
     this.initialize();
-    if (Configuration.getUIServer().enabled === true) {
-      this.uiServer = UIServerFactory.getUIServerImplementation(
+    Configuration.getUIServer().enabled === true &&
+      (this.uiServer = UIServerFactory.getUIServerImplementation(
         Configuration.getUIServer().type,
         Configuration.getUIServer()
-      );
-    }
+      ));
     Configuration.getPerformanceStorage().enabled === true &&
       (this.storage = StorageFactory.getStorage(
         Configuration.getPerformanceStorage().type,