Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
fix empty breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
JingleH committed Jun 27, 2023
1 parent c0078c7 commit f3fb839
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion express/blocks/template-list/breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ function getCrumbsForSEOPage(templatesUrl, allTemplatesMetadata, taskCategories,
}
crumbs.push(segmentCrumb);
});
const shortTitle = getMetadata('short-title');
if (!shortTitle) {
return crumbs;
}
const lastCrumb = createTag('li');
lastCrumb.textContent = getMetadata('short-title');
lastCrumb.textContent = shortTitle;
crumbs.push(lastCrumb);
return crumbs;
}
Expand Down

0 comments on commit f3fb839

Please sign in to comment.