Skip to content

Commit c914dfb

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Fix missing base64 images
Summary: I discovered failing snapshot tests (T47222928, T47222859). They fail because `<Image>` 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
1 parent 86b671f commit c914dfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Libraries/Image/RCTUIImageViewAnimated.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ - (void)setImage:(UIImage *)image
9292

9393
NSUInteger animatedImageFrameCount = ((UIImage<RCTAnimatedImage> *)image).animatedImageFrameCount;
9494

95-
// Check the frame count
96-
if (animatedImageFrameCount <= 1) {
95+
// In case frame count is 0, there is no reason to continue.
96+
if (animatedImageFrameCount == 0) {
9797
return;
9898
}
9999

0 commit comments

Comments
 (0)