fix: avoid null exception at checking worker node readiness
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index 7a64a7e563f9d6d8e1fffdac9ce91d1bc64d5b1e..86692de92f50c6cc9b1c1c7bcb3e1e960d5693e5 100644 (file)
@@ -123,7 +123,7 @@ export abstract class AbstractWorkerChoiceStrategy<
    * @returns Whether the worker node is ready or not.
    */
   protected isWorkerNodeReady (workerNodeKey: number): boolean {
-    return this.pool.workerNodes[workerNodeKey]?.info.ready ?? false
+    return this.pool.workerNodes[workerNodeKey]?.info?.ready ?? false
   }
 
   /**