Skip to content

Commit

Permalink
perf: label condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Jun 16, 2020
1 parent 826bc15 commit a92fec4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,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 !== '') {

const label = this.getBreadcrumb(crumb.meta.breadcrumb);
if (label?.length > 0) {
return createElement(
'li',
{
Expand Down

0 comments on commit a92fec4

Please sign in to comment.