From: Jérôme Benoit Date: Fri, 10 Mar 2023 20:24:41 +0000 (+0100) Subject: fix: initialize attribute in the constructor X-Git-Tag: v2.3.8~11 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b8f3418c31a95b3b90a88ce07a34c9046a376fc3;p=poolifier.git fix: initialize attribute in the constructor Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 314c13c0..ebe74dcb 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -19,7 +19,7 @@ export abstract class AbstractWorkerChoiceStrategy< Response > implements IWorkerChoiceStrategy { /** {@inheritDoc} */ - public readonly isDynamicPool: boolean = this.pool.type === PoolType.DYNAMIC + public readonly isDynamicPool: boolean /** {@inheritDoc} */ public requiredStatistics: RequiredStatistics = { runTime: false @@ -32,7 +32,9 @@ export abstract class AbstractWorkerChoiceStrategy< */ public constructor ( protected readonly pool: IPoolInternal - ) {} + ) { + this.isDynamicPool = this.pool.type === PoolType.DYNAMIC + } /** {@inheritDoc} */ public abstract reset (): boolean