Skip to content

Commit

Permalink
[gitlab] Handle null in avatar_url
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusludmann committed Jun 18, 2021
1 parent b546641 commit 4058a2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/server/src/gitlab/gitlab-auth-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class GitLabAuthProvider extends GenericAuthProvider {
authUser: {
authId: String(id),
authName: username,
avatarUrl: avatar_url,
avatarUrl: avatar_url || undefined,
name,
primaryEmail: email
},
Expand Down
2 changes: 1 addition & 1 deletion components/server/src/gitlab/gitlab-repository-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class GitlabRepositoryProvider implements RepositoryProvider {
const cloneUrl = response.http_url_to_repo;
const description = response.default_branch;
const host = parseRepoUrl(cloneUrl)!.host;
const avatarUrl = response.owner.avatar_url;
const avatarUrl = response.owner.avatar_url || undefined;
const webUrl = response.web_url;
return { host, owner, name, cloneUrl, description, avatarUrl, webUrl };
}
Expand Down

0 comments on commit 4058a2e

Please sign in to comment.