File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
middleware/contextualizers Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ import { correctTranslatedContentStrings } from '../../lib/correct-translation-c
6
6
export default async function glossaries ( req , res , next ) {
7
7
if ( ! req . pagePath . endsWith ( 'get-started/quickstart/github-glossary' ) ) return next ( )
8
8
9
+ // If the current version (which is found as part of the URL), does not
10
+ // correspond to a supported version, the Liquid rendering will fail
11
+ // (if there's uses of `ifversion` in any the Liquid).
12
+ // So we'll skip this contextualizer and let the 404 error take over later.
13
+ if ( ! req . context . currentVersionObj ) return next ( )
14
+
9
15
// When the current language is *not* English, we'll need to get the English
10
16
// glossary based on the term. We'll use this to render the translated
11
17
// glossaries. For example, if the Korean translation has a corruption
You can’t perform that action at this time.
0 commit comments