Skip to content

Commit

Permalink
fix(daffio): rendering empty toc (#3416)
Browse files Browse the repository at this point in the history
  • Loading branch information
griest024 authored Jan 10, 2025
1 parent 4edd95a commit 7c57b80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@if (breadcrumbs.length > 0) {
<nav aria-label="Breadcrumb">
<ol daff-breadcrumb>
@for (breadcrumb of breadcrumbs(); track $index) {
@for (breadcrumb of breadcrumbs; track $index) {
<li daffBreadcrumbItem [active]="$last">
@if ($last) {
{{breadcrumb.label}}
Expand All @@ -24,7 +24,7 @@
<ng-content></ng-content>
</daff-article>
</div>
@if (toc) {
@if (toc.length > 0) {
<daffio-docs-table-of-contents
class="daffio-doc-article__table-of-contents"
[tableOfContents]="toc">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class DaffioDocArticleComponent {
private sidebarService: DaffioSidebarService,
) {}

@Input() toc?: DaffDocTableOfContents;
@Input() toc: DaffDocTableOfContents = [];
@Input() breadcrumbs: Array<DaffBreadcrumb> = [];

open() {
Expand Down

0 comments on commit 7c57b80

Please sign in to comment.