authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-27 21:32:15-08:00
committergravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-27 21:32:15-08:00
logd48b42c0174f7ed26de8fdd1b0f4f75c82c71fe7
tree7ded4cdacdd267fc9b6ff7cf5101c3b5c6bed490
parentfb45896588afb89b3151e2432682f39e98bfb51f

fix type


1 files changed, 5 insertions(+), 5 deletions(-)

apps/server/src/provider/Layers/ProviderService.ts+5-5
...@@ -93,14 +93,14 @@ function toRuntimePayloadFromSession(session: ProviderSession): Record<string, u...@@ -93,14 +93,14 @@ function toRuntimePayloadFromSession(session: ProviderSession): Record<string, u
93 };93 };
94}94}
9595
96function readPersistedCwd(runtimePayload: ProviderSessionBinding["runtimePayload"]): string | undefined {96function readPersistedCwd(
97 runtimePayload: ProviderSessionBinding["runtimePayload"],
98): string | undefined {
97 if (!runtimePayload || typeof runtimePayload !== "object" || Array.isArray(runtimePayload)) {99 if (!runtimePayload || typeof runtimePayload !== "object" || Array.isArray(runtimePayload)) {
98 return undefined;100 return undefined;
99 }101 }
100 const rawCwd = runtimePayload.cwd;102 const rawCwd = "cwd" in runtimePayload ? runtimePayload.cwd : undefined;
101 if (typeof rawCwd !== "string") {103 if (typeof rawCwd !== "string") return undefined;
102 return undefined;
103 }
104 const trimmed = rawCwd.trim();104 const trimmed = rawCwd.trim();
105 return trimmed.length > 0 ? trimmed : undefined;105 return trimmed.length > 0 ? trimmed : undefined;
106}106}