mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: add eslint-plugin-sonarjs and rules (#2767)
This commit is contained in:
@@ -207,10 +207,12 @@ export function createAffineAuth(prefix = '/') {
|
||||
}),
|
||||
}).then(r => r.json()) as Promise<LoginResponse>;
|
||||
} catch (error) {
|
||||
if (error instanceof Error && 'code' in error) {
|
||||
if (error.code === 'auth/popup-closed-by-user') {
|
||||
return null;
|
||||
}
|
||||
if (
|
||||
error instanceof Error &&
|
||||
'code' in error &&
|
||||
error.code === 'auth/popup-closed-by-user'
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
logger.error('Failed to sign in', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user