From b83d267d0614380981452039626879021c2a4d68 Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 6 May 2022 08:44:02 +0200 Subject: Fix HTTP resources on projects, attempt 3 --- includes/fetcher/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/fetcher/index.js b/includes/fetcher/index.js index 165053e..5ffc75e 100644 --- a/includes/fetcher/index.js +++ b/includes/fetcher/index.js @@ -33,7 +33,7 @@ issues: null, vcs: project.http_url_to_repo, web: project.web_url, - icon: project.avatar_url.replace("http://", "https://"), + icon: project.avatar_url ? project.avatar_url.replace("http://", "https://") : null, showcase: project.topics.includes("Showcase"), date: project.last_activity_at, event: (await axios.get(`https://gitlab.minteck.org/api/v4/projects/${project.id}/events`)).data[0], @@ -77,7 +77,7 @@ issues: null, vcs: project.http_url_to_repo, web: project.web_url, - icon: project.avatar_url.replace("http://", "https://"), + icon: project.avatar_url ? project.avatar_url.replace("http://", "https://") : null, showcase: project.topics.includes("Showcase"), date: project.last_activity_at, event: (await axios.get(`https://gitlab.minteck.org/api/v4/projects/${project.id}/events`)).data[0], -- cgit