From 51740812b69937984c80d80256778dfb2a94d6c2 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 9 Jun 2022 00:31:42 -0400 Subject: [PATCH] Allows for missing avatar urls --- src/avatars.ts | 2 +- src/git/models/author.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/avatars.ts b/src/avatars.ts index 0f28d59..bd56770 100644 --- a/src/avatars.ts +++ b/src/avatars.ts @@ -194,7 +194,7 @@ async function getAvatarUriFromRemoteProvider( account = await remote?.provider.getAccountForCommit(repoPathOrCommit.ref, { avatarSize: size }); } } - if (account == null) { + if (account?.avatarUrl == null) { // If we have no account assume that won't change (without a reset), so set the timestamp to "never expire" avatar.uri = undefined; avatar.timestamp = maxSmallIntegerV8; diff --git a/src/git/models/author.ts b/src/git/models/author.ts index 6708e71..d68b5f9 100644 --- a/src/git/models/author.ts +++ b/src/git/models/author.ts @@ -4,5 +4,5 @@ export interface Account { provider: RemoteProviderReference; name: string | undefined; email: string | undefined; - avatarUrl: string; + avatarUrl: string | undefined; }