From c914dfb8d362f3219f7544ea262f97b1d439d9ea Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Thu, 18 Jul 2019 07:17:25 -0700 Subject: [PATCH] Fix missing base64 images Summary: I discovered failing snapshot tests (T47222928, T47222859). They fail because `` doesn't work with base64 anymore. There are two problems that are causing this. 1st is on iOS https://fburl.com/pw246vgw where if the image has 1 frame count, nothing is displayed. 2nd is in https://fburl.com/3im0u38r where if image is not within assets, we don't display it. Reviewed By: shergin Differential Revision: D16334151 fbshipit-source-id: 1ea8ef676b7207834ba63f4264e6ef2f05f24b96 --- Libraries/Image/RCTUIImageViewAnimated.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Image/RCTUIImageViewAnimated.m b/Libraries/Image/RCTUIImageViewAnimated.m index a8f01c5bfdd..99b5a7bd41c 100644 --- a/Libraries/Image/RCTUIImageViewAnimated.m +++ b/Libraries/Image/RCTUIImageViewAnimated.m @@ -92,8 +92,8 @@ static NSUInteger RCTDeviceFreeMemory() { NSUInteger animatedImageFrameCount = ((UIImage *)image).animatedImageFrameCount; - // Check the frame count - if (animatedImageFrameCount <= 1) { + // In case frame count is 0, there is no reason to continue. + if (animatedImageFrameCount == 0) { return; }