Skip to content

Commit 7c57b80

Browse files
authored
fix(daffio): rendering empty toc (#3416)
1 parent 4edd95a commit 7c57b80

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/daffio/src/app/docs/components/doc-article/component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@if (breadcrumbs.length > 0) {
99
<nav aria-label="Breadcrumb">
1010
<ol daff-breadcrumb>
11-
@for (breadcrumb of breadcrumbs(); track $index) {
11+
@for (breadcrumb of breadcrumbs; track $index) {
1212
<li daffBreadcrumbItem [active]="$last">
1313
@if ($last) {
1414
{{breadcrumb.label}}
@@ -24,7 +24,7 @@
2424
<ng-content></ng-content>
2525
</daff-article>
2626
</div>
27-
@if (toc) {
27+
@if (toc.length > 0) {
2828
<daffio-docs-table-of-contents
2929
class="daffio-doc-article__table-of-contents"
3030
[tableOfContents]="toc">

apps/daffio/src/app/docs/components/doc-article/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class DaffioDocArticleComponent {
2626
private sidebarService: DaffioSidebarService,
2727
) {}
2828

29-
@Input() toc?: DaffDocTableOfContents;
29+
@Input() toc: DaffDocTableOfContents = [];
3030
@Input() breadcrumbs: Array<DaffBreadcrumb> = [];
3131

3232
open() {

0 commit comments

Comments
 (0)