From 1ff466232621d266ff5b55aae7309d52173f5710 Mon Sep 17 00:00:00 2001 From: Daniel Luberda Date: Sat, 18 May 2019 13:23:44 +0200 Subject: [PATCH] Update CachedImage.cs --- source/FFImageLoading.Forms/CachedImage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/FFImageLoading.Forms/CachedImage.cs b/source/FFImageLoading.Forms/CachedImage.cs index 7e02af62a..48c016b81 100644 --- a/source/FFImageLoading.Forms/CachedImage.cs +++ b/source/FFImageLoading.Forms/CachedImage.cs @@ -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))