Skip to content

Commit 4989123

Browse files
linnettfacebook-github-bot
authored andcommitted
Fix for Image displayName, currently displaying as <Component> in tests (#23287)
Summary: As per #21937, Image `displayName` is not set. This means it comes through as `<Component>` in tests. [General][fixed] - fix `displayName` for `Image` Pull Request resolved: #23287 Differential Revision: D13941744 Pulled By: cpojer fbshipit-source-id: eab161eee415ec4f7207efcd5c6e2a4bbe67dfe1
1 parent c7b57f1 commit 4989123

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Libraries/Image/Image.android.js

+1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ let Image = (
259259
};
260260

261261
Image = React.forwardRef(Image);
262+
Image.displayName = 'Image';
262263

263264
/**
264265
* Retrieve the width and height (in pixels) of an image prior to displaying it

Libraries/Image/Image.ios.js

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ let Image = (
124124
};
125125

126126
Image = React.forwardRef(Image);
127+
Image.displayName = 'Image';
127128

128129
/**
129130
* Retrieve the width and height (in pixels) of an image prior to displaying it.

0 commit comments

Comments
 (0)