Fixes build and tests

This commit is contained in:
Shannon
2021-03-18 16:36:23 +11:00
parent 3350611b16
commit eccbb32f42
2 changed files with 32 additions and 19 deletions

View File

@@ -511,7 +511,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
if (!passwordChangeResult.Success)
{
foreach (string memberName in passwordChangeResult.Result.ChangeError?.MemberNames)
foreach (string memberName in passwordChangeResult.Result?.ChangeError?.MemberNames ?? Enumerable.Empty<string>())
{
ModelState.AddModelError(memberName, passwordChangeResult.Result.ChangeError?.ErrorMessage ?? string.Empty);
}