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 { ...@@ -148,7 +148,7 @@ export class CreateExternalUserComponent implements OnInit {
this.userOTP.firstname = data.firstname; this.userOTP.firstname = data.firstname;
this.userOTP.lastname = data.lastname; this.userOTP.lastname = data.lastname;
this.userOTP.email = data.email; 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) => { catchError((err: any) => {
this.notify.handleSoftErrors(err); this.notify.handleSoftErrors(err);
...@@ -171,7 +171,7 @@ export class CreateExternalUserComponent implements OnInit { ...@@ -171,7 +171,7 @@ export class CreateExternalUserComponent implements OnInit {
data.recipients.forEach((element: any) => { data.recipients.forEach((element: any) => {
this.setCorrespondentsShorcuts(element, 'recipient'); this.setCorrespondentsShorcuts(element, 'recipient');
}); });
} else { } else if (data.senders !== undefined) {
data.senders.forEach((element: any) => { data.senders.forEach((element: any) => {
this.setCorrespondentsShorcuts(element, 'sender'); 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