mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
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) {
|
||||
const { icon } = OAuthProviderMap[provider];
|
||||
const { icon } =
|
||||
provider in OAuthProviderMap
|
||||
? OAuthProviderMap[provider]
|
||||
: { icon: undefined };
|
||||
|
||||
const onClick = useCallback(() => {
|
||||
onContinue(provider);
|
||||
|
||||
Reference in New Issue
Block a user