add eror handler, update snapshots

This commit is contained in:
kbariotis 2021-03-20 16:22:57 +02:00
parent 90d68b3e0b
commit 92ac11c49d
5 changed files with 18 additions and 74 deletions

View file

@ -911,10 +911,14 @@ class App extends React.Component<ExcalidrawProps, AppState> {
?.classList.toggle("theme--dark", this.state.theme === "dark");
if (this.state.autoSave && this.state.fileHandle) {
this.saveLocalSceneDebounced(
this.scene.getElementsIncludingDeleted(),
this.state,
);
try {
this.saveLocalSceneDebounced(
this.scene.getElementsIncludingDeleted(),
this.state,
);
} catch (error) {
this.setState({ autoSave: false });
}
}
if (