From: Jérôme Benoit Date: Sat, 15 Apr 2023 12:58:55 +0000 (+0200) Subject: fix: fix worker choice strategy options default value X-Git-Tag: v2.4.9~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d01e4d675d7612232edfb9203124deab570b2281;p=poolifier.git fix: fix worker choice strategy options default value 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 859ead82..6a9cff23 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -64,6 +64,7 @@ export abstract class AbstractWorkerChoiceStrategy< /** @inheritDoc */ public setOptions (opts: WorkerChoiceStrategyOptions): void { + opts = opts ?? DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS this.checkOptions(opts) this.opts = opts }