Fixing a whoopsie

This commit is contained in:
Paul Kinlan
2019-02-21 20:38:08 +00:00
committed by GitHub
parent 6f00e9825c
commit 300612b09b

View File

@@ -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