From 9c49c9d3c25ceb1633c3af48da7f5b0ad9dfae8e Mon Sep 17 00:00:00 2001 From: Aidan Jones Date: Wed, 25 Sep 2024 15:52:21 -0400 Subject: [PATCH] Change types for getSnapshot and resolveSnapshot --- source/SIL.AppBuilder.Portal/common/workflow/db.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/SIL.AppBuilder.Portal/common/workflow/db.ts b/source/SIL.AppBuilder.Portal/common/workflow/db.ts index d838c2b5b..adbce5204 100644 --- a/source/SIL.AppBuilder.Portal/common/workflow/db.ts +++ b/source/SIL.AppBuilder.Portal/common/workflow/db.ts @@ -41,11 +41,11 @@ export async function getSnapshot(productId: string) { } }) )?.Snapshot || 'null' - ) as Snapshot | undefined; + ) as Snapshot | null; } -export function resolveSnapshot(machine: WorkflowMachine, snap?: Snapshot) { - return snap !== undefined ? machine.resolveState(snap) : undefined; +export function resolveSnapshot(machine: WorkflowMachine, snap: Snapshot | null) { + return snap ? machine.resolveState(snap) : undefined; } /**