From 6b6fba9393bd83f849ad89a1cbc919915f26e626 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 20 Jul 2023 16:38:24 +0100 Subject: [PATCH] optional chain --- packages/backend-core/src/db/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend-core/src/db/utils.ts b/packages/backend-core/src/db/utils.ts index 137e210898..08764154eb 100644 --- a/packages/backend-core/src/db/utils.ts +++ b/packages/backend-core/src/db/utils.ts @@ -126,7 +126,7 @@ export async function getAppsByIDs(appIds: string[]) { ) // have to list the apps which exist, some may have been deleted return settled - .filter(promise => promise.status === "fulfilled" && promise.value.state !== AppState.INVALID) + .filter(promise => promise.status === "fulfilled" && promise.value?.state !== AppState.INVALID) .map(promise => (promise as PromiseFulfilledResult).value) }