mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 03:47:06 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user