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:
parent
c1fbc1261a
commit
6bdaed2a9b
1 changed files with 0 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue