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
This commit is contained in:
Christopher Dro 2016-02-09 19:15:52 -08:00 committed by facebook-github-bot-9
parent 272096ce7c
commit a11f980a34
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);
}
}