fix(core): fix client crash (#12966)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved reliability when displaying OAuth provider icons by handling
cases where the provider may not be recognized, preventing potential
errors during authentication.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
EYHN
2025-07-01 11:38:13 +08:00
committed by GitHub
parent 9529adf33e
commit f46d288b1b

View File

@@ -110,7 +110,10 @@ interface OauthProviderProps {
}
function OAuthProvider({ onContinue, provider }: OauthProviderProps) {
const { icon } = OAuthProviderMap[provider];
const { icon } =
provider in OAuthProviderMap
? OAuthProviderMap[provider]
: { icon: undefined };
const onClick = useCallback(() => {
onContinue(provider);