Skip to content

Commit

Permalink
fix exception with unsupported version (github#17088)
Browse files Browse the repository at this point in the history
Co-authored-by: Chiedo John <[email protected]>
  • Loading branch information
rachmari and chiedo authored Jan 8, 2021
1 parent 45660b2 commit 3194a2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions middleware/contextualizers/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = async (req, res, next) => {
// For example, free-pro-team@latest corresponds to dotcom,
// [email protected] 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]
Expand Down

0 comments on commit 3194a2d

Please sign in to comment.