Skip to content

Commit

Permalink
refactor: minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Oct 20, 2024
1 parent d453c6f commit 5483a50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export function addCommmands(plugin: ObsidianGit) {
"Successfully deleted repository. Reloading plugin..."
);
plugin.unloadPlugin();
await plugin.init();
await plugin.init({ fromReload: true });
}
} else {
new Notice("No repository found");
Expand Down
4 changes: 3 additions & 1 deletion src/setting/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,9 @@ export class ObsidianGitSettingsTab extends PluginSettingTab {
if (value) {
plugin.unloadPlugin();
} else {
plugin.init().catch((e) => plugin.displayError(e));
plugin
.init({ fromReload: true })
.catch((e) => plugin.displayError(e));
}
new Notice(
"Obsidian must be restarted for the changes to take affect."
Expand Down

0 comments on commit 5483a50

Please sign in to comment.