Selaa lähdekoodia

chore(merge): 解决冲突

BaiLuoYan 4 viikkoa sitten
vanhempi
commit
bd622c8cb6
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      src/components/LoginForm/useAction.ts

+ 6 - 3
src/components/LoginForm/useAction.ts

@@ -11,9 +11,12 @@ export interface UseActionParams {
 export type LoginErrorKey = 'loginError' | null;
 
 function getErrorMessage(err: unknown): { message: string | null; errorKey: LoginErrorKey } {
-    const anyErr = err as { name?: string; info?: { errorMessage?: string }; response?: { data?: { errorMessage?: string } } };
-    const backendMsg =
-        anyErr?.info?.errorMessage ?? anyErr?.response?.data?.errorMessage ?? null;
+    const anyErr = err as {
+        name?: string;
+        info?: { errorMessage?: string };
+        response?: { data?: { errorMessage?: string } };
+    };
+    const backendMsg = anyErr?.info?.errorMessage ?? anyErr?.response?.data?.errorMessage ?? null;
     if (backendMsg && typeof backendMsg === 'string') {
         return { message: backendMsg, errorKey: null };
     }