فهرست منبع

Reload fix (#2955)

* package

* reload fix

---------

Co-authored-by: Justin Rhee <jusrhee@Justins-MacBook-Air.local>
jusrhee 3 سال پیش
والد
کامیت
ff665640ff
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      dashboard/src/main/auth/Register.tsx

+ 3 - 2
dashboard/src/main/auth/Register.tsx

@@ -105,11 +105,12 @@ const Register: React.FC<Props> = ({
         })
         .catch((err) => {
           console.log("registration:", err);
-          location.reload();
-          setButtonDisabled(false);
           if (err.response?.data?.error) {
             setCurrentError(err.response.data.error)
+          } else {
+            location.reload();
           }
+          setButtonDisabled(false);
         });
     }
   };