Skip to content

Commit

Permalink
fix: issue coreui#10
Browse files Browse the repository at this point in the history
Potential fix to repeated breadcrumb from inherited data dictionary.
  • Loading branch information
burntblark committed May 31, 2018
1 parent b891114 commit d7df6fe
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/breadcrumb/app-breadcrumb.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ export class AppBreadcrumbService {
if (route.outlet === 'primary') {
const routeSnapshot = route.snapshot;
url += '/' + routeSnapshot.url.map(segment => segment.path).join('/');
breadcrumbs.push({
label: route.snapshot.data,
url: url
});
if (route.routeConfig.data && route.routeConfig.data.title) {
breadcrumbs.push({
label: route.snapshot.data,
url: url
});
}
currentRoute = route;
}
});
Expand Down

0 comments on commit d7df6fe

Please sign in to comment.