Skip to content

Commit

Permalink
Fixed missing null check in BlockEditorPropertyEditor (#11184)
Browse files Browse the repository at this point in the history
Thanks @lauraneto - reviewed this and your fix solves the issue. #h5yr

(cherry picked from commit 23d2106)

# Conflicts:
#	src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs
  • Loading branch information
nul800sebastiaan committed Nov 3, 2021
1 parent bb323b0 commit eee8bd5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public IEnumerable<ValidationResult> Validate(object value, string valueType, ob
_textService.Localize("validation", "entriesShort", new[]
{
validationLimit.Min.ToString(),
(validationLimit.Min - blockEditorData.Layout.Count()).ToString()
(validationLimit.Min - (blockEditorData?.Layout.Count() ?? 0)).ToString()
}),
new[] { "minCount" });
}
Expand Down

0 comments on commit eee8bd5

Please sign in to comment.