From: Jérôme Benoit Date: Mon, 3 Apr 2023 09:55:36 +0000 (+0200) Subject: refactor: condition style X-Git-Tag: v2.4.0-0~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=73cff87e755a06f6d01ba4be320aa92bfe0da7e4;p=poolifier.git refactor: condition style Signed-off-by: Jérôme Benoit --- diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 1f42a90b..0ea3fa62 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -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() } }