Skip to content

Commit

Permalink
Merge pull request github#26946 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Jul 21, 2023
2 parents 15a846a + 5e7f74f commit c380715
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions middleware/contextualizers/glossaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { correctTranslatedContentStrings } from '../../lib/correct-translation-c
export default async function glossaries(req, res, next) {
if (!req.pagePath.endsWith('get-started/quickstart/github-glossary')) return next()

// If the current version (which is found as part of the URL), does not
// correspond to a supported version, the Liquid rendering will fail
// (if there's uses of `ifversion` in any the Liquid).
// So we'll skip this contextualizer and let the 404 error take over later.
if (!req.context.currentVersionObj) return next()

// When the current language is *not* English, we'll need to get the English
// glossary based on the term. We'll use this to render the translated
// glossaries. For example, if the Korean translation has a corruption
Expand Down

0 comments on commit c380715

Please sign in to comment.