refactor(shared): simplify normalize SDK null guards

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-11 23:35:57 +09:00
parent 470ed8b13a
commit 2d65896bbd
+2 -2
View File
@@ -7,7 +7,7 @@ export function normalizeSDKResponse<TData>(
fallback: TData,
options?: NormalizeSDKResponseOptions,
): TData {
if (response === null || response === undefined) {
if (response == null) {
return fallback
}
@@ -17,7 +17,7 @@ export function normalizeSDKResponse<TData>(
if (typeof response === "object" && "data" in response) {
const data = (response as { data?: unknown }).data
if (data !== null && data !== undefined) {
if (data != null) {
return data as TData
}