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
  • Loading branch information
lauraneto authored Oct 5, 2021
1 parent bdfa54a commit 23d2106
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using System.Linq;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Blocks;
Expand Down Expand Up @@ -264,7 +263,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 23d2106

Please sign in to comment.