Skip to content

Commit c026732

Browse files
committed
just return early instead of throwing an error until we rewrite this middleware for the new siteTree structure
1 parent 35922bc commit c026732

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

middleware/breadcrumbs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ module.exports = async function breadcrumbs (req, res, next) {
1919
pathParts.shift()
2020

2121
const productPath = path.posix.join('/', req.context.currentProduct)
22+
23+
if (!req.context.siteTree[req.language][req.context.currentVersion].products) {
24+
return next()
25+
}
26+
2227
const product = req.context.siteTree[req.language][req.context.currentVersion].products[req.context.currentProduct]
2328

2429
if (!product) {

0 commit comments

Comments
 (0)