From 7aa2f4763d2ca23123ffadaf7c83f624f8374d84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 9 May 2024 15:24:03 +0200 Subject: [PATCH] fix: ensure task function worker usage is defined before usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 73f4e31a..2f91df9d 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1670,7 +1670,7 @@ export abstract class AbstractPool< ): void { const workerNode = this.workerNodes[workerNodeKey] // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (workerNode.usage != null) { + if (workerNode?.usage != null) { ++workerNode.usage.tasks.sequentiallyStolen } const taskFunctionWorkerUsage = -- 2.34.1