Skip to content

Commit

Permalink
Added test to exclude blank breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bradley committed Jun 12, 2020
1 parent d3021bb commit dc73ddb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ class VueBreadcrumbs implements PluginObject<ComponentOptions<Vue>> {
this.$breadcrumbs.map((crumb: RouteRecord, index: number) => {
if (crumb?.meta?.breadcrumb) {
let label = this.getBreadcrumb(crumb.meta.breadcrumb);
if (label === '') {
console.log('Breadcrumb blank. Ignoring');
} else {
console.log('Breadcrumb valid', crumb?.meta?.breadcrumb);
if (label !== '') {

return createElement(
'li',
{
Expand Down

0 comments on commit dc73ddb

Please sign in to comment.