refactor: condition style
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Apr 2023 09:55:36 +0000 (11:55 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Apr 2023 09:55:36 +0000 (11:55 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/abstract-worker.ts

index 1f42a90bcf073e514a0acf2eec4fa4f04fdb0aea..0ea3fa6253103292775550bfb2d13fa329f19079 100644 (file)
@@ -98,7 +98,7 @@ export abstract class AbstractWorker<
       this.mainWorker = value.parent
     } else if (value.kill !== undefined) {
       // Here is time to kill this worker, just clearing the interval
-      if (this.aliveInterval != null) clearInterval(this.aliveInterval)
+      this.aliveInterval != null && clearInterval(this.aliveInterval)
       this.emitDestroy()
     }
   }