Skip to content

Commit

Permalink
Add optional chaining to toc and footnotes
Browse files Browse the repository at this point in the history
This resolves #12
  • Loading branch information
indifferentghost authored Sep 22, 2024
1 parent 9bd8ed6 commit d41445e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/_includes/layout.vto
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

{{ include "templates/menu.vto" }}

{{ if toc.length }}
{{ if toc?.length }}
<nav class="toc">
<h2>On this page</h2>
<ol>
Expand Down Expand Up @@ -74,7 +74,7 @@
{{ /if }}
</div>

{{ if it.footnotes.length }}
{{ if it.footnotes?.length }}
<aside role="note" class="footnotes">
<dl>
{{ for note of footnotes }}
Expand Down

0 comments on commit d41445e

Please sign in to comment.