Skip to content

Commit

Permalink
Fix bug with menus and new file behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkaney committed May 10, 2024
1 parent 69acbcd commit 725206b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/desktop/src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,15 +266,15 @@ class ElectronMenu extends EventEmitter<MenuEvents> {

if (document) {
const trackSaveState = () => {
this.saveItem.enabled = document.saved !== true;
this.saveItem.enabled = document.needsSave;
this.saveAsItem.enabled = true;
this.closeItem.enabled = true;

let unStatus = document.on("status", () => {
this.saveItem.enabled = document.saved !== true;
this.saveItem.enabled = document.needsSave;
});
let unUpdate = document.on("update", () => {
this.saveItem.enabled = document.saved !== true;
this.saveItem.enabled = document.needsSave;
});

if (this._untrackDocument) this._untrackDocument();
Expand Down

0 comments on commit 725206b

Please sign in to comment.