Skip to content

Commit 3194a2d

Browse files
rachmarichiedo
andauthored
fix exception with unsupported version (#17088)
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
1 parent 45660b2 commit 3194a2d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

middleware/contextualizers/webhooks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = async (req, res, next) => {
1111
// For example, free-pro-team@latest corresponds to dotcom,
1212
// enterprise-server@2.22 corresponds to ghes-2.22,
1313
// and github-ae@latest corresponds to ghae
14+
if (!allVersions[req.context.currentVersion]) return next()
1415
const webhookPayloadDir = allVersions[req.context.currentVersion].miscVersionName
1516

1617
const webhookPayloadsForCurrentVersion = webhookPayloads[webhookPayloadDir]

0 commit comments

Comments
 (0)