fix: presence erroring on update if no remote url (#1010)

This commit is contained in:
Jack C 2021-04-19 06:20:29 -04:00 committed by GitHub
parent 5f790bda97
commit 019154023b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,7 @@ export async function activity(previous: ActivityPayload = {}) {
} }
if (!removeRemoteRepository && git?.repositories.length) { if (!removeRemoteRepository && git?.repositories.length) {
let repo = git.repositories.find((repo) => repo.ui.selected)?.state.remotes[0].fetchUrl; let repo = git.repositories.find((repo) => repo.ui.selected)?.state.remotes[0]?.fetchUrl;
if (repo) { if (repo) {
if (repo.startsWith('git@')) { if (repo.startsWith('git@')) {