Skip to content

Commit eee8bd5

Browse files
Fixed missing null check in BlockEditorPropertyEditor (#11184)
Thanks @lauraneto - reviewed this and your fix solves the issue. #h5yr (cherry picked from commit 23d2106) # Conflicts: # src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs
1 parent bb323b0 commit eee8bd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Web/PropertyEditors/BlockEditorPropertyEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public IEnumerable<ValidationResult> Validate(object value, string valueType, ob
258258
_textService.Localize("validation", "entriesShort", new[]
259259
{
260260
validationLimit.Min.ToString(),
261-
(validationLimit.Min - blockEditorData.Layout.Count()).ToString()
261+
(validationLimit.Min - (blockEditorData?.Layout.Count() ?? 0)).ToString()
262262
}),
263263
new[] { "minCount" });
264264
}

0 commit comments

Comments
 (0)