Skip to content

Commit

Permalink
fix: save settings on plugin unload
Browse files Browse the repository at this point in the history
  • Loading branch information
denolehov committed Oct 30, 2020
1 parent 717a538 commit 67cd7a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ export default class ObsidianGit extends Plugin {
});
}

async onunload() {
await this.saveData(this.settings);
}

// region: main methods
async isRepoClean(): Promise<boolean> {
this.setState(PluginState.checkRepoClean);
Expand Down

0 comments on commit 67cd7a3

Please sign in to comment.