(id: string | null | undefined)
| 86 | preferredId?: string | null, |
| 87 | ): string { |
| 88 | const pick = (id: string | null | undefined) => { |
| 89 | if (!id) return null; |
| 90 | const p = providers.find((x) => x.id === id); |
| 91 | return p && isProviderConfigured(p) ? id : null; |
| 92 | }; |
| 93 | return ( |
| 94 | pick(preferredId) ?? |
| 95 | pick(readStoredProviderId()) ?? |
no test coverage detected