Commit 7da27168 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #16956 TIME 0:10 otp: Fix phone is null + senders is undefined

parent 1b9bfb8c
......@@ -148,7 +148,7 @@ export class CreateExternalUserComponent implements OnInit {
this.userOTP.firstname = data.firstname;
this.userOTP.lastname = data.lastname;
this.userOTP.email = data.email;
this.userOTP.phone = phone !== undefined ? phone.replace(/( |\.|\-)/g, '').replace('0', '+33') : '';
this.userOTP.phone = phone !== null ? phone.replace(/( |\.|\-)/g, '').replace('0', '+33') : '';
}),
catchError((err: any) => {
this.notify.handleSoftErrors(err);
......@@ -171,7 +171,7 @@ export class CreateExternalUserComponent implements OnInit {
data.recipients.forEach((element: any) => {
this.setCorrespondentsShorcuts(element, 'recipient');
});
} else {
} else if (data.senders !== undefined) {
data.senders.forEach((element: any) => {
this.setCorrespondentsShorcuts(element, 'sender');
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment