mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
adding error message including stacktrace and example
Reviewed By: fkgozali Differential Revision: D5908789 fbshipit-source-id: 061e414d5105df607b7dcafefb134ad9c94a9a71
This commit is contained in:
committed by
Facebook Github Bot
parent
29e7659111
commit
b694f96762
@@ -272,6 +272,10 @@ var Image = createReactClass({
|
||||
console.warn('The <Image> component requires a `source` property rather than `src`.');
|
||||
}
|
||||
|
||||
if (this.props.children) {
|
||||
throw new Error('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;
|
||||
|
||||
Reference in New Issue
Block a user