Skip to content

Make images smaller using best-in-class codecs, right in the browser.

JavaScript

Fixing a whoopsie

Paul Kinlan300612b09b5c
diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx
index c10799f2..67641f90 100644
--- a/src/components/App/index.tsx
+++ b/src/components/App/index.tsx
@@ -76,8 +76,9 @@ export default class App extends Component<Props, State> {
@bind
private onFileDrop({ files }: FileDropEvent) {
if (!files && files.length > 0) return;
+ const file = files[0];
this.openEditor();
- this.setState({ files[0] });
+ this.setState({ file });
}
@bind