fix: NullReferenceException
This commit is contained in:
parent
fd0897019b
commit
f521a4de9e
|
|
@ -49,7 +49,7 @@ public class UserViewModel
|
|||
FirstName = user.FirstName,
|
||||
LastName = user.LastName,
|
||||
Email = user.Email,
|
||||
Phone = user.Phone?.Substring(0, 3) == "+86" ? user.Phone.Substring(3) : user.Phone,
|
||||
Phone = (!string.IsNullOrWhiteSpace(user.Phone) && user.Phone.Length > 3) ? (user.Phone.Substring(0, 3) == "+86" ? user.Phone.Substring(3) : user.Phone) : user.Phone,
|
||||
Type = user.Type,
|
||||
Role = user.Role,
|
||||
Source = user.Source,
|
||||
|
|
|
|||
Loading…
Reference in a new issue