From 55c86a40878a559069c81f75e995564b7f658abe Mon Sep 17 00:00:00 2001 From: Matthew Stanciu Date: Fri, 15 Mar 2024 23:19:57 -0400 Subject: [PATCH] Fix GitHub build --- pages/api/github.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/github.js b/pages/api/github.js index 978b713b6..21d3e9262 100644 --- a/pages/api/github.js +++ b/pages/api/github.js @@ -19,7 +19,7 @@ const getMessage = (type, payload, repo) => { const getUrl = (type, payload, repo) => { switch (type) { case 'PushEvent': - return payload.commits?.[0].url + return payload.commits?.[0]?.url ? normalizeGitHubCommitUrl(payload.commits[0].url) : 'https://github.com/hackclub' case 'PullRequestEvent':