From 724d0cff7aec4bed8f868caaa2a27638c7e8868f Mon Sep 17 00:00:00 2001 From: anirbanpaulcom Date: Tue, 6 Feb 2024 20:43:15 +0530 Subject: [PATCH] profileupdate without empty or whitespace --- app/views/ProfileView/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 0b6bd2b8e..ea04b8f1e 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -155,15 +155,15 @@ class ProfileView extends React.Component } return !( - user.name === name && - user.username === username && + (!name.trim() || user.name === name) && + (!username.trim() || user.username === username) && + (!newPassword?.trim() || !newPassword) && + (!email || !email.trim() || (user.emails && user.emails[0].address === email)) && user.bio === bio && user.nickname === nickname && - !newPassword && - user.emails && - user.emails[0].address === email && !customFieldsChanged ); + }; submit = async (): Promise => {