Allow opening empty excalidraw file (#1348)

* allow openning empty file

* correctly throw error

* fix error handling

* switch back to error objects

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Kostas Bariotis 2020-04-10 10:58:09 +01:00 committed by GitHub
parent 70e7dd6e3b
commit 0a284adc18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 10 deletions

View file

@ -2358,7 +2358,7 @@ export class App extends React.Component<any, AppState> {
}),
)
.catch((error) => {
this.setState({ isLoading: false, errorMessage: error });
this.setState({ isLoading: false, errorMessage: error.message });
});
} else {
this.setState({