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:
@@ -110,7 +110,10 @@ interface OauthProviderProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function OAuthProvider({ onContinue, provider }: OauthProviderProps) {
|
function OAuthProvider({ onContinue, provider }: OauthProviderProps) {
|
||||||
const { icon } = OAuthProviderMap[provider];
|
const { icon } =
|
||||||
|
provider in OAuthProviderMap
|
||||||
|
? OAuthProviderMap[provider]
|
||||||
|
: { icon: undefined };
|
||||||
|
|
||||||
const onClick = useCallback(() => {
|
const onClick = useCallback(() => {
|
||||||
onContinue(provider);
|
onContinue(provider);
|
||||||
|
|||||||
Reference in New Issue
Block a user