From 319db2d57d6464d649b31239dad86ed9bf60d027 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 24 Apr 2021 11:15:05 +0200 Subject: [PATCH] Fixed empty table of contents being rendered --- material/partials/nav-item.html | 6 +++--- material/partials/toc.html | 4 ++-- src/partials/nav-item.html | 6 +++--- src/partials/toc.html | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html index f55ca979f..c1a24a1a0 100644 --- a/material/partials/nav-item.html +++ b/material/partials/nav-item.html @@ -40,10 +40,10 @@ {% set toc = page.toc %} {% set first = toc | first %} - {% if first is defined and first.level == 1 %} + {% if first and first.level == 1 %} {% set toc = first.children %} {% endif %} - {% if toc is iterable %} + {% if toc %}