Skip to content

Commit 8602b29

Browse files
authored
1 parent 207c1b9 commit 8602b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/git/src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ async function createCheckoutItems(repository: Repository, detached = false): Pr
285285
const buttons = await getRemoteRefItemButtons(repository);
286286
let fallbackRemoteButtons: RemoteSourceActionButton[] | undefined = [];
287287
const remote = repository.remotes.find(r => r.pushUrl === repository.HEAD?.remote || r.fetchUrl === repository.HEAD?.remote) ?? repository.remotes[0];
288-
const remoteUrl = remote.pushUrl ?? remote.fetchUrl;
288+
const remoteUrl = remote?.pushUrl ?? remote?.fetchUrl;
289289
if (remoteUrl) {
290290
fallbackRemoteButtons = buttons.get(remoteUrl);
291291
}

0 commit comments

Comments
 (0)