Skip to content

Commit

Permalink
Update CachedImage.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-luberda committed May 18, 2019
1 parent 1c05fe8 commit 1ff4662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/FFImageLoading.Forms/CachedImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ protected override SizeRequest OnMeasure(double widthConstraint, double heightCo
height = desiredHeight * (width / desiredWidth);
}

return new SizeRequest(new Size(width, height));
return new SizeRequest(new Size(double.IsNaN(width) ? 0 : width, double.IsNaN(height) ? 0 : height));
}

if (double.IsPositiveInfinity(widthConstraint) && double.IsPositiveInfinity(heightConstraint))
Expand Down

0 comments on commit 1ff4662

Please sign in to comment.