optional chain
This commit is contained in:
parent
054fb24ea9
commit
6b6fba9393
|
@ -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<App>).value)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue