From c4c7beaefa09ca9f8b39aa7f2c709b8f2a595703 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 16 Mar 2017 15:57:46 +0100 Subject: [PATCH] Fixed case where table of contents icon is missing on mobile navigation --- material/partials/nav-item.html | 2 +- src/partials/nav-item.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/partials/nav-item.html b/material/partials/nav-item.html index 8d09de180..c3e0b51ba 100644 --- a/material/partials/nav-item.html +++ b/material/partials/nav-item.html @@ -30,7 +30,7 @@
  • {% set toc_ = page.toc %} - {% if toc_ | first is defined %} + {% if toc_ | first is defined and "\x3ch1 id=" in page.content %} {% set toc_ = (toc_ | first).children %} {% endif %} {% if toc_ | first is defined %} diff --git a/src/partials/nav-item.html b/src/partials/nav-item.html index 1a39b51dd..07f6eee0c 100644 --- a/src/partials/nav-item.html +++ b/src/partials/nav-item.html @@ -71,7 +71,7 @@ type="checkbox" id="toc" /> - {% if toc_ | first is defined %} + {% if toc_ | first is defined and "\x3ch1 id=" in page.content %} {% set toc_ = (toc_ | first).children %} {% endif %}