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 88a296c commit 00d87bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class VueBreadcrumbs implements PluginObject<ComponentOptions<Vue>> {
},
this.$breadcrumbs.map((crumb: RouteRecord, index: number) => {
if (crumb?.meta?.breadcrumb) {
if (typeof crumb?.meta?.breadcrumb === 'string' && crumb?.meta?.breadcrumb === '') {
if (this.getBreadcrumb(crumb.meta.breadcrumb) === '') {
console.log('Breadcrumb blank. Ignoring');
} else {
console.log('Breadcrumb valid', crumb?.meta?.breadcrumb);
Expand Down

0 comments on commit 00d87bf

Please sign in to comment.