Only create ImageProxy if there's a value prop

This commit is contained in:
Cássio Zen 2016-06-07 21:04:40 -03:00
parent 0cf5dc141a
commit d5da853db1

View File

@ -8,7 +8,7 @@ export default class ImageControl extends React.Component {
super(props); super(props);
this.state = { this.state = {
currentImage: new ImageProxy(props.value, null, true) currentImage: props.value ? new ImageProxy(props.value, null, true) : null
}; };
this.revokeCurrentImage = this.revokeCurrentImage.bind(this); this.revokeCurrentImage = this.revokeCurrentImage.bind(this);