From 9151f85ce9bdd63cd6995d8fb3789bf9b62b6b3d Mon Sep 17 00:00:00 2001 From: Khusika Dhamar Gusti Date: Fri, 27 Nov 2020 15:12:26 +0700 Subject: fix(toc): Use data attributes for toc Partially fixes: #401 Signed-off-by: Khusika Dhamar Gusti --- src/js/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/js') diff --git a/src/js/theme.js b/src/js/theme.js index 5919e0f..518923f 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -397,7 +397,7 @@ class Theme { initToc() { const $tocCore = document.getElementById('TableOfContents'); if ($tocCore === null) return; - if (document.getElementById('toc-static').getAttribute('kept') || this.util.isTocStatic()) { + if (document.getElementById('toc-static').getAttribute('data-kept') || this.util.isTocStatic()) { const $tocContentStatic = document.getElementById('toc-content-static'); if ($tocCore.parentElement !== $tocContentStatic) { $tocCore.parentElement.removeChild($tocCore); -- cgit v1.2.3