diff --git a/src/components/Widgets/ImageControl.js b/src/components/Widgets/ImageControl.js index 19f1b051..6ea2de11 100644 --- a/src/components/Widgets/ImageControl.js +++ b/src/components/Widgets/ImageControl.js @@ -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; diff --git a/src/components/Widgets/ImagePreview.js b/src/components/Widgets/ImagePreview.js index 9db11ddc..90b2da19 100644 --- a/src/components/Widgets/ImagePreview.js +++ b/src/components/Widgets/ImagePreview.js @@ -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 ? : null; }