Bootstrap: Avoid a direct call on an attribute.
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 27 Jan 2021 12:54:22 +0000 (13:54 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 27 Jan 2021 12:54:22 +0000 (13:54 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Bootstrap.ts

index 50e861dd6ebd3754578339bf99fe283c3562f5d6..48188134d88fcb3c8959e8144734d9da95a75699 100644 (file)
@@ -65,7 +65,7 @@ export default class Bootstrap {
   public async stop(): Promise<void> {
     if (isMainThread && this.isStarted) {
       await this.getWorkerImplementation().stop();
-      if (this.workerImplementation) {
+      if (this.getWorkerImplementation()) {
         // Nullify to force worker implementation instance creation
         this.workerImplementation = null;
       }