Revert D5887667: Adding error message including stacktrace
Differential Revision: D5887667 fbshipit-source-id: 2b3b877317bd4bfddcb5d7886c7399c669d4bbd6
This commit is contained in:
parent
c5d8785fa5
commit
3649fce129
|
@ -28,7 +28,6 @@ var ViewStylePropTypes = require('ViewStylePropTypes');
|
|||
var createReactClass = require('create-react-class');
|
||||
var filterObject = require('fbjs/lib/filterObject');
|
||||
var flattenStyle = require('flattenStyle');
|
||||
var invariant = require('invariant');
|
||||
var merge = require('merge');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
var resolveAssetSource = require('resolveAssetSource');
|
||||
|
@ -273,8 +272,6 @@ var Image = createReactClass({
|
|||
console.warn('The <Image> component requires a `source` property rather than `src`.');
|
||||
}
|
||||
|
||||
invariant(!this.props.children, 'The <Image> component cannot contain children. If you want to render content on top of the image, consider using aboslute positioning.');
|
||||
|
||||
if (source && (source.uri || Array.isArray(source))) {
|
||||
let style;
|
||||
let sources;
|
||||
|
|
|
@ -25,7 +25,6 @@ const StyleSheetPropType = require('StyleSheetPropType');
|
|||
|
||||
const createReactClass = require('create-react-class');
|
||||
const flattenStyle = require('flattenStyle');
|
||||
const invariant = require('invariant');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
const resolveAssetSource = require('resolveAssetSource');
|
||||
|
||||
|
@ -375,8 +374,6 @@ const Image = createReactClass({
|
|||
console.warn('The <Image> component requires a `source` property rather than `src`.');
|
||||
}
|
||||
|
||||
invariant(!this.props.children, 'The <Image> component cannot contain children. If you want to render content on top of the image, consider using aboslute positioning.');
|
||||
|
||||
return (
|
||||
<RCTImageView
|
||||
{...this.props}
|
||||
|
|
|
@ -439,22 +439,7 @@ exports.examples = [
|
|||
},
|
||||
},
|
||||
{
|
||||
title: 'Nesting content inside <Image> component',
|
||||
render: function() {
|
||||
return (
|
||||
<View style={{width: 60, height: 60}}>
|
||||
<Image
|
||||
style={{...StyleSheet.absoluteFillObject}}
|
||||
source={fullImage}/>
|
||||
<Text style={styles.nestedText}>
|
||||
React
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Nesting content inside <ImageBackground> component',
|
||||
title: 'Nesting',
|
||||
render: function() {
|
||||
return (
|
||||
<ImageBackground
|
||||
|
|
Loading…
Reference in New Issue