From 6f41eaf8e2b32182a3dda71e0a3de2219412a84f Mon Sep 17 00:00:00 2001 From: Sam Poder Date: Wed, 22 Feb 2023 10:48:51 +0800 Subject: [PATCH] Update github.js --- 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 36f28962..dc688fa4 100644 --- a/pages/api/github.js +++ b/pages/api/github.js @@ -23,7 +23,7 @@ export default async function github(req, res) { : null, message: x.type === 'PushEvent' - ? x.payload.commits[0].message + ? x.payload.commits[0]?.message : x.type === 'PullRequestEvent' ? x.payload.pull_request.title : x.type === 'WatchEvent'