diff --git a/src/Umbraco.Web.BackOffice/Extensions/HtmlHelperBackOfficeExtensions.cs b/src/Umbraco.Web.BackOffice/Extensions/HtmlHelperBackOfficeExtensions.cs index 7f07ee45dd..68025fc7ab 100644 --- a/src/Umbraco.Web.BackOffice/Extensions/HtmlHelperBackOfficeExtensions.cs +++ b/src/Umbraco.Web.BackOffice/Extensions/HtmlHelperBackOfficeExtensions.cs @@ -112,8 +112,6 @@ namespace Umbraco.Extensions /// public static IHtmlContent AngularValueResetPasswordCodeInfoScript(this IHtmlHelper html, object val) { - if (val is null) return html.Raw(string.Empty); - var sb = new StringBuilder(); sb.AppendLine(); sb.AppendLine(@"var errors = [];"); @@ -129,7 +127,7 @@ namespace Umbraco.Extensions sb.AppendLine(@"app.value(""resetPasswordCodeInfo"", {"); sb.AppendLine(@"errors: errors,"); sb.Append(@"resetCodeModel: "); - sb.AppendLine(val.ToString()); + sb.AppendLine(val?.ToString() ?? "null"); sb.AppendLine(@"});"); return html.Raw(sb.ToString());