fix exception with unsupported version (#17088)
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user