diff --git a/index.js b/index.js index 4548646..2c440db 100644 --- a/index.js +++ b/index.js @@ -117,7 +117,7 @@ export default class PhotoUpload extends React.Component { renderChildren = props => { return React.Children.map(props.children, child => { - if (child && child.type === Image && this.state.avatarSource) { + if (child && child.type.displayName.includes("Image") && this.state.avatarSource) { return React.cloneElement(child, { source: this.state.avatarSource })