Skip to content

Commit

Permalink
fix: don't start autobackup with 0 interval time
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Dec 6, 2021
1 parent 1c5eeab commit a36c741
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export class ObsidianGitSettingsTab extends PluginSettingTab {
plugin.settings.autoBackupAfterFileChange = value;
plugin.saveSettings();
plugin.clearAutoBackup();
plugin.startAutoBackup(plugin.settings.autoSaveInterval);
if (plugin.settings.autoSaveInterval > 0) {
plugin.startAutoBackup(plugin.settings.autoSaveInterval);
}
})
);
new Setting(containerEl)
Expand Down

0 comments on commit a36c741

Please sign in to comment.