auto save only when its supported
This commit is contained in:
parent
5e1e16c150
commit
01f5914a82
@ -248,7 +248,8 @@ export const actionToggleAutoSave = register({
|
||||
commitToHistory: false,
|
||||
};
|
||||
},
|
||||
PanelComponent: ({ appState, updateData }) => (
|
||||
PanelComponent: ({ appState, updateData }) =>
|
||||
supported ? (
|
||||
<label style={{ display: "flex" }}>
|
||||
<input
|
||||
type="checkbox"
|
||||
@ -264,5 +265,7 @@ export const actionToggleAutoSave = register({
|
||||
<div className="TooltipIcon">{questionCircle}</div>
|
||||
</Tooltip>
|
||||
</label>
|
||||
) : (
|
||||
<></>
|
||||
),
|
||||
});
|
||||
|
@ -910,7 +910,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
||||
.querySelector(".excalidraw")
|
||||
?.classList.toggle("theme--dark", this.state.theme === "dark");
|
||||
|
||||
if (this.state.autoSave && this.state.fileHandle) {
|
||||
if (this.state.autoSave && this.state.fileHandle && supported) {
|
||||
try {
|
||||
this.saveLocalSceneDebounced(
|
||||
this.scene.getElementsIncludingDeleted(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user