Unbreak Image.ios.js
Summary: Don't pass `null` as default empty uri. Use `undefined` instead. Differential Revision: D3393211 fbshipit-source-id: ac7cd385aa7f2196bc0743b8679dd2c94be4108b
This commit is contained in:
parent
8d038572f3
commit
2e7a536aba
|
@ -211,7 +211,7 @@ var Image = React.createClass({
|
|||
},
|
||||
|
||||
render: function() {
|
||||
var source = resolveAssetSource(this.props.source) || { uri: null, width: undefined, height: undefined };
|
||||
var source = resolveAssetSource(this.props.source) || { uri: undefined, width: undefined, height: undefined };
|
||||
var {width, height, uri} = source;
|
||||
var style = flattenStyle([{width, height}, styles.base, this.props.style]) || {};
|
||||
|
||||
|
@ -225,11 +225,11 @@ var Image = React.createClass({
|
|||
if (isNetwork && (tintColor || this.props.blurRadius)) {
|
||||
RawImage = RCTImageView;
|
||||
}
|
||||
|
||||
|
||||
if (uri === '') {
|
||||
console.warn('source.uri should not be an empty string');
|
||||
}
|
||||
|
||||
|
||||
if (this.props.src) {
|
||||
console.warn('The <Image> component requires a `source` property rather than `src`.');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue