typos
This commit is contained in:
parent
ade51b27fc
commit
0f1b95f262
@ -35,7 +35,7 @@ export default class ImageControl extends React.Component {
|
||||
const files = [...fileList];
|
||||
const imageType = /^image\//;
|
||||
|
||||
// Iterate to list of files and return the first image on the list
|
||||
// Iterate through the list of files and return the first image on the list
|
||||
const file = files.find((currentFile) => {
|
||||
if (imageType.test(currentFile.type)) {
|
||||
return currentFile;
|
||||
|
@ -7,10 +7,11 @@ export default class ImagePreview extends React.Component {
|
||||
}
|
||||
|
||||
handleImageLoaded() {
|
||||
window.URL.revokeObjectURL(this.props);
|
||||
window.URL.revokeObjectURL(this.props.value);
|
||||
}
|
||||
|
||||
render() {
|
||||
console.log(this.props)
|
||||
const { value } = this.props;
|
||||
return value ? <img src={window.URL.createObjectURL(value)} onLoad={this.handleImageLoaded} /> : null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user