From 33138de696a553e632c30f67d596df4de9954cd6 Mon Sep 17 00:00:00 2001 From: Garrett Date: Mon, 18 Sep 2023 12:10:47 -0700 Subject: [PATCH] Fix check for save --- src/renderer/src/stories/pages/Page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/stories/pages/Page.js b/src/renderer/src/stories/pages/Page.js index 07d3ef6ea..cfd4cc474 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/renderer/src/stories/pages/Page.js @@ -17,7 +17,7 @@ export class Page extends LitElement { // ); // } - info = { globalState: {}, states: { saved: false } }; + info = { globalState: {} }; constructor(info = {}) { super(); @@ -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({