refactor: remove redundant ?? undefined in Slack probe

Remove redundant nullish coalescing with undefined (?? undefined) in
Slack probe result handling. The properties from Slack auth.test() are
already typed as string | undefined, so ?? undefined is a no-op.
This commit is contained in:
Cafexss
2026-03-13 14:43:49 +08:00
committed by Altay
parent 9e28f5aac2
commit 63e41d1735

View File

@@ -26,8 +26,8 @@ export async function probeSlack(token: string, timeoutMs = 2500): Promise<Slack
ok: true,
status: 200,
elapsedMs: Date.now() - start,
bot: { id: result.user_id ?? undefined, name: result.user ?? undefined },
team: { id: result.team_id ?? undefined, name: result.team ?? undefined },
bot: { id: result.user_id, name: result.user },
team: { id: result.team_id, name: result.team },
};
} catch (err) {
const message = err instanceof Error ? err.message : String(err);