Token set check: drop the array clause the access_token check already decides

A JSON array has no string access_token, so the typeof check refuses it;
the separate Array.isArray clause was an equivalent mutant's worth of code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-19 12:44:20 +02:00
commit 6bdaed2a9b

View file

@ -188,7 +188,6 @@ export async function requestProviderTokens(
if (
typeof answer !== "object" ||
answer === null ||
Array.isArray(answer) ||
typeof (answer as { access_token?: unknown }).access_token !== "string" ||
!(answer as { access_token: string }).access_token ||
(answer as { error?: unknown }).error !== undefined