Skip to content

Commit d7df6fe

Browse files
authored
fix: issue coreui#10
Potential fix to repeated breadcrumb from inherited data dictionary.
1 parent b891114 commit d7df6fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/breadcrumb/app-breadcrumb.service.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ export class AppBreadcrumbService {
2828
if (route.outlet === 'primary') {
2929
const routeSnapshot = route.snapshot;
3030
url += '/' + routeSnapshot.url.map(segment => segment.path).join('/');
31-
breadcrumbs.push({
32-
label: route.snapshot.data,
33-
url: url
34-
});
31+
if (route.routeConfig.data && route.routeConfig.data.title) {
32+
breadcrumbs.push({
33+
label: route.snapshot.data,
34+
url: url
35+
});
36+
}
3537
currentRoute = route;
3638
}
3739
});

0 commit comments

Comments
 (0)