Skip to content

Commit

Permalink
Fix check for save
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Sep 18, 2023
1 parent 3eec717 commit 33138de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/src/stories/pages/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class Page extends LitElement {
// );
// }

info = { globalState: {}, states: { saved: false } };
info = { globalState: {} };

constructor(info = {}) {
super();
Expand Down Expand Up @@ -64,7 +64,7 @@ export class Page extends LitElement {
this.beforeTransition();

// Otherwise note unsaved updates if present
if (this.unsavedUpdates || this.info.states?.saved) {
if (this.unsavedUpdates || ('states' in this.info && !this.info.states.saved)) {
if (transition === 1) await this.save(); // Save before a single forward transition
else {
Swal.fire({
Expand Down

0 comments on commit 33138de

Please sign in to comment.