Skip to content

Commit

Permalink
repo sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Octomerger authored Dec 16, 2020
2 parents 89bc9e2 + c4cc1f1 commit dbe4d08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion middleware/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ module.exports = async (req, res, next) => {
const productPath = path.posix.join('/', req.context.currentProduct)
const product = req.context.siteTree[req.language][req.context.currentVersion].products[req.context.currentProduct]

if (!product) {
return next()
}

req.context.breadcrumbs.product = {
href: path.posix.join('/', req.context.currentVersion, productPath),
title: product.title
Expand Down Expand Up @@ -95,6 +99,5 @@ module.exports = async (req, res, next) => {
title: articleTitle
}
}

return next()
}

0 comments on commit dbe4d08

Please sign in to comment.