Browse Source

Update bug fix

symbol-text-infinite-loop
mohamedsalem401 5 months ago
parent
commit
2a406acd8c
  1. 6
      packages/core/src/editor/model/Editor.ts

6
packages/core/src/editor/model/Editor.ts

@ -412,7 +412,7 @@ export default class EditorModel extends Model {
window.onbeforeunload = changes ? () => true : null;
}
if (stm.isAutosave() && changes >= stm.getStepsBeforeSave() && !this._isStoring) {
if (stm.isAutosave() && changes >= stm.getStepsBeforeSave()) {
this.store().catch((err) => this.logError(err));
}
}
@ -877,10 +877,12 @@ export default class EditorModel extends Model {
// might increase the dirty count before it can be properly cleared.
setTimeout(() => {
this.clearDirtyCount();
this._isStoring = false;
}, 1);
const data = this.storeData();
await this.Storage.store(data, options);
setTimeout(() => {
this._isStoring = false;
}, 1);
return data;
}

Loading…
Cancel
Save