maryluis il y a 3 ans
Parent
commit
53b841be6f
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      shop/src/components/users/profilePage.js

+ 4 - 3
shop/src/components/users/profilePage.js

@@ -125,9 +125,10 @@ const YourProfile = ({state, orders, loginStatus = {}, updateStatus, updatedUser
                         }/>
                     <button disabled = {
                       (newPicture == "PENDING") ||
-                      ( !isAdmin && (!nowPassword)) || 
-                       ((isAdmin &&  isOwner.id && data._id && isOwner.id == data._id) && !nowPassword ) ||
-                       (Object.keys(loginStatus).length == 0) ||
+                      ( !isAdmin && (!nowPassword || (Object.keys(loginStatus).length == 0))) || 
+                       (((isAdmin &&  isOwner.id && data._id && isOwner.id == data._id) && (!nowPassword  || (Object.keys(loginStatus).length == 0)))
+                        &&
+                       (Object.keys(loginStatus).length == 0) ) ||
                        (loginStatus.status && loginStatus.status == "RESOLVED" && !loginStatus.payload.data.login) 
                       }  
                          onClick = {