Skip to content

Commit

Permalink
fix: abort edit remotes on no url
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Aug 15, 2022
1 parent 846c1fe commit e617278
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -838,10 +838,11 @@ export default class ObsidianGit extends Plugin {
if (remoteName) {
const urlModal = new GeneralModal(this.app, [], "Enter the remote URL");
const remoteURL = await urlModal.open();
await this.gitManager.setRemote(remoteName, remoteURL);
return remoteName;
if (remoteURL) {
await this.gitManager.setRemote(remoteName, remoteURL);
return remoteName;
}
}

}

async selectRemoteBranch(): Promise<string | undefined> {
Expand Down

0 comments on commit e617278

Please sign in to comment.