fix: fix worker choice strategy options default value
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index 859ead823bc233c6e251eb004e7d6fb0563459e6..6a9cff236a2def16eee80786e869e795d774f586 100644 (file)
@@ -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
   }