From 89c12fc1a7dba0a1c939e4b245c0cb08fb55d1e8 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Thu, 6 Apr 2023 13:02:46 +0200 Subject: [PATCH] fix: Make sure retryOf does not take null value (no-changelog) (#5915) --- packages/workflow/src/WorkflowHooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/workflow/src/WorkflowHooks.ts b/packages/workflow/src/WorkflowHooks.ts index cb7a15b8b3..3462719bc2 100644 --- a/packages/workflow/src/WorkflowHooks.ts +++ b/packages/workflow/src/WorkflowHooks.ts @@ -33,7 +33,8 @@ export class WorkflowHooks { this.executionId = executionId; this.workflowData = workflowData; this.sessionId = optionalParameters.sessionId; - this.retryOf = optionalParameters.retryOf; + // retryOf might be `null` from TypeORM + this.retryOf = optionalParameters.retryOf ?? undefined; } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any