diff --git a/packages/@honkit/theme-default/_layouts/website/page.html b/packages/@honkit/theme-default/_layouts/website/page.html index ceeee0365..c03501164 100644 --- a/packages/@honkit/theme-default/_layouts/website/page.html +++ b/packages/@honkit/theme-default/_layouts/website/page.html @@ -45,14 +45,11 @@ return; } var sidebarState = __init__getSidebarState(true) - if (!sidebarState) { - return; - } var book = document.querySelector(".book"); - if (!book) { - return; + // Show sidebar if it enabled + if (sidebarState && book) { + book.classList.add("without-animation", "with-summary"); } - book.classList.add("without-animation", "with-summary"); book.classList.remove("honkit-cloak"); } __init__restoreLastSidebarState();