Skip to content

Commit c529a37

Browse files
committed
fix: add remote on mobile
close #375
1 parent 54924f4 commit c529a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/isomorphicGit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,8 +556,8 @@ export class IsomorphicGit extends GitManager {
556556
await this.wrapFS(git.deleteRemote({ ...this.getRepo(), remote: remoteName }));
557557
}
558558

559-
async getRemoteUrl(remote: string): Promise<string> {
560-
return (await this.wrapFS(git.listRemotes({ ...this.getRepo() }))).filter((item) => item.remote == remote)[0].url;
559+
async getRemoteUrl(remote: string): Promise<string | undefined> {
560+
return (await this.wrapFS(git.listRemotes({ ...this.getRepo() }))).filter((item) => item.remote == remote)[0]?.url;
561561
}
562562

563563
updateBasePath(basePath: string): void {

0 commit comments

Comments
 (0)