1
0
mirror of synced 2025-12-25 02:17:36 -05:00

fix exception with unsupported version (#17088)

Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
This commit is contained in:
Rachael Sewell
2021-01-08 06:08:05 -08:00
committed by GitHub
parent 45660b2c0b
commit 3194a2db0b

View File

@@ -11,6 +11,7 @@ module.exports = async (req, res, next) => {
// For example, free-pro-team@latest corresponds to dotcom,
// enterprise-server@2.22 corresponds to ghes-2.22,
// and github-ae@latest corresponds to ghae
if (!allVersions[req.context.currentVersion]) return next()
const webhookPayloadDir = allVersions[req.context.currentVersion].miscVersionName
const webhookPayloadsForCurrentVersion = webhookPayloads[webhookPayloadDir]