File tree 1 file changed +12
-1
lines changed
src/learning-track/middleware
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -176,9 +176,20 @@ async function indexOfLearningTrackGuide(
176
176
) {
177
177
let guideIndex = - 1
178
178
179
+ const renderOpts = { textOnly : true }
179
180
for ( let i = 0 ; i < trackGuidePaths . length ; i ++ ) {
180
181
// Learning track URLs may have Liquid conditionals.
181
- const renderedGuidePath = await renderContent ( trackGuidePaths [ i ] , context , { textOnly : true } )
182
+ let renderedGuidePath = ''
183
+ try {
184
+ renderedGuidePath = await renderContent ( trackGuidePaths [ i ] , context , renderOpts )
185
+ } catch {
186
+ const englishFallbackContext = { ...context , currentLanguage : 'en' }
187
+ renderedGuidePath = await renderContent (
188
+ trackGuidePaths [ i ] ,
189
+ englishFallbackContext ,
190
+ renderOpts ,
191
+ )
192
+ }
182
193
183
194
if ( ! renderedGuidePath ) continue
184
195
You can’t perform that action at this time.
0 commit comments