Skip to content

Commit 4bee25b

Browse files
committed
fixup2
1 parent 3ee7084 commit 4bee25b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎apps/server/src/provider/Layers/OpenCodeAdapter.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,14 @@ function openCodeEventSessionId(event: OpenCodeSubscribedEvent): string | undefi
7676
return undefined;
7777
}
7878

79-
const info = (properties as { readonly info?: { readonly id?: unknown } }).info;
80-
const sessionIDFromInfo = info && typeof info.id === "string" ? info.id : undefined;
81-
if (sessionIDFromInfo) {
82-
return sessionIDFromInfo;
83-
}
8479
const sessionID = (properties as { readonly sessionID?: unknown }).sessionID;
85-
return typeof sessionID === "string" ? sessionID : undefined;
80+
const sessionIDFromProperties = typeof sessionID === "string" ? sessionID : undefined;
81+
if (sessionIDFromProperties) {
82+
return sessionIDFromProperties;
83+
}
84+
85+
const info = (properties as { readonly info?: { readonly id?: unknown } }).info;
86+
return info && typeof info.id === "string" ? info.id : undefined;
8687
}
8788

8889
function openCodeEventSessionTitle(event: OpenCodeSubscribedEvent): string | undefined {

0 commit comments

Comments
 (0)