Skip to content

Commit

Permalink
fix: No longer save on exit when incomplete event information is prov…
Browse files Browse the repository at this point in the history
…ided
  • Loading branch information
valentine195 committed Apr 17, 2024
1 parent 79d0e1d commit b59162e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/settings/modals/event/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class CreateEventModal extends CalendariumModal {
}
async checkCanExit() {
if (this.isValidEvent()) return true;
/* if (this.plugin.data.exit.savingEvent) return true; */
if (this.plugin.data.exit.savingEvent) return true;
return new Promise((resolve) => {
const modal = new ConfirmModal(
this.plugin.app,
Expand Down Expand Up @@ -125,8 +125,7 @@ export class CreateEventModal extends CalendariumModal {

async close() {
if (await this.checkCanExit()) {
/* this.saved = get(this.store.valid);
this.calendar = get(this.store); */
this.saved = this.isValidEvent();
super.close();
}
}
Expand Down

0 comments on commit b59162e

Please sign in to comment.