aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/EditProfile.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-08 17:32:29 -0400
committerGitHub <noreply@github.com>2021-06-08 17:32:29 -0400
commit946b1be53189487e860f37e1b422c69bb44cf0c8 (patch)
treec85bb7622afc6d64cd7254455a46c4dca2f79cb8 /src/screens/profile/EditProfile.tsx
parentea088da1304a9ba345b75aab9184f7e8d928a4ac (diff)
parent17d41145a0791d2687c7f4abd934b83c008e6f12 (diff)
Merge pull request #459 from hsalhab/tma-762-remove-website-bug
[TMA-762] Fix clear website doesn't update field in profile
Diffstat (limited to 'src/screens/profile/EditProfile.tsx')
-rw-r--r--src/screens/profile/EditProfile.tsx15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/screens/profile/EditProfile.tsx b/src/screens/profile/EditProfile.tsx
index 26802e45..765bbf01 100644
--- a/src/screens/profile/EditProfile.tsx
+++ b/src/screens/profile/EditProfile.tsx
@@ -305,14 +305,13 @@ const EditProfile: React.FC<EditProfileProps> = ({route, navigation}) => {
type: 'image/jpg',
});
}
- if (form.website) {
- if (form.isValidWebsite) {
- request.append('website', form.website);
- } else {
- setForm({...form, attemptedSubmit: false});
- setTimeout(() => setForm({...form, attemptedSubmit: true}));
- invalidFields = true;
- }
+
+ if (form.isValidWebsite) {
+ request.append('website', form.website);
+ } else {
+ setForm({...form, attemptedSubmit: false});
+ setTimeout(() => setForm({...form, attemptedSubmit: true}));
+ invalidFields = true;
}
if (form.bio) {