Skip to content

Commit

Permalink
Get missing crops from configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
recyclethis authored and nul800sebastiaan committed Jul 27, 2020
1 parent 48963f6 commit 4460e8d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ internal void ApplyConfiguration(ImageCropperConfiguration configuration)
// merge the crop values - the alias + width + height comes from
// configuration, but each crop can store its own coordinates

if (Crops == null) return;

var configuredCrops = configuration?.Crops;
if (configuredCrops == null) return;

var crops = Crops.ToList();
//Use Crops if it's not null, otherwise create a new list
var crops = Crops?.ToList() ?? new List<ImageCropperCrop>();

foreach (var configuredCrop in configuredCrops)
{
Expand Down

0 comments on commit 4460e8d

Please sign in to comment.