Skip to content

Commit 32ed6f0

Browse files
author
Crystal Tenn
committed
Fix null checks
1 parent 5697b9a commit 32ed6f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/git/repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export async function getGitHubUrls(): Promise<GitHubUrls[] | null> {
7070
let remote = r.state.remotes.filter(remote => remote.name === remoteName);
7171

7272
// If "origin" does not exist, automatically get another remote
73-
if (remote === undefined || remote.length === 0) {
73+
if (r.state.remotes.length !== 0 && remote.length === 0) {
7474
remote = [r.state.remotes[0]];
7575
}
7676

0 commit comments

Comments
 (0)