From a11f980a3425149bed7f560a3162315cc8c0e82f Mon Sep 17 00:00:00 2001 From: Christopher Dro Date: Tue, 9 Feb 2016 19:15:52 -0800 Subject: [PATCH] Remove isRequired on source prop for Android Summary: Makes source required across both platforms. Closes https://github.com/facebook/react-native/pull/5845 Reviewed By: svcscm Differential Revision: D2920250 Pulled By: vjeux fb-gh-sync-id: 21845b601df32dc2e12a95544afa3db4c0414746 shipit-source-id: 21845b601df32dc2e12a95544afa3db4c0414746 --- Libraries/Image/Image.android.js | 4 ++-- Libraries/Image/Image.ios.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Image/Image.android.js b/Libraries/Image/Image.android.js index 4c920dcf2..fdc8c2f64 100644 --- a/Libraries/Image/Image.android.js +++ b/Libraries/Image/Image.android.js @@ -63,7 +63,7 @@ var ImageViewAttributes = merge(ReactNativeViewAttributes.UIView, { var Image = React.createClass({ propTypes: { ...View.propTypes, - style: StyleSheetPropType(ImageStylePropTypes), + style: StyleSheetPropType(ImageStylePropTypes), /** * `uri` is a string representing the resource identifier for the image, which * could be an http address, a local file path, or a static image @@ -75,7 +75,7 @@ var Image = React.createClass({ }), // Opaque type returned by require('./image.jpg') PropTypes.number, - ]).isRequired, + ]), /** * similarly to `source`, this property represents the resource used to render * the loading indicator for the image, displayed until image is ready to be diff --git a/Libraries/Image/Image.ios.js b/Libraries/Image/Image.ios.js index 4830a6dec..625dc8d50 100644 --- a/Libraries/Image/Image.ios.js +++ b/Libraries/Image/Image.ios.js @@ -213,7 +213,7 @@ var Image = React.createClass({ if (this.context.isInAParentText) { RawImage = RCTVirtualImage; if (!width || !height) { - console.warn('You must specify a width and height for the image %s', uri); + console.warn('You must specify a width and height for the image %s', uri); } }