Skip to content

Commit

Permalink
remove unnecessary length check
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Oct 8, 2024
1 parent d24df5d commit d18046c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const PatientManager = () => {
const setPhoneNumber = (value: string) => {
_setPhoneNumber(value);
const error = PhoneNumberValidator()(value);
if (value.length >= 13 && !error) {
if (!error) {
updateQuery({ phone_number: value });
}
if ((value === "+91" || value === "") && qParams.phone_number) {
Expand All @@ -122,7 +122,7 @@ export const PatientManager = () => {
const setEmergencyPhoneNumber = (value: string) => {
_setEmergencyPhoneNumber(value);
const error = PhoneNumberValidator()(value);
if (value.length >= 13 && !error) {
if (!error) {
updateQuery({ emergency_phone_number: value });
}
if ((value === "+91" || value === "") && qParams.emergency_phone_number) {
Expand Down

0 comments on commit d18046c

Please sign in to comment.