Skip to content

Commit dbe4d08

Browse files
authored
repo sync
2 parents 89bc9e2 + c4cc1f1 commit dbe4d08

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

middleware/breadcrumbs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = async (req, res, next) => {
2222
const productPath = path.posix.join('/', req.context.currentProduct)
2323
const product = req.context.siteTree[req.language][req.context.currentVersion].products[req.context.currentProduct]
2424

25+
if (!product) {
26+
return next()
27+
}
28+
2529
req.context.breadcrumbs.product = {
2630
href: path.posix.join('/', req.context.currentVersion, productPath),
2731
title: product.title
@@ -95,6 +99,5 @@ module.exports = async (req, res, next) => {
9599
title: articleTitle
96100
}
97101
}
98-
99102
return next()
100103
}

0 commit comments

Comments
 (0)