From: Gustavo Sousa Date: Tue, 23 Jan 2024 16:21:58 +0000 (-0300) Subject: docs/sphinx: Fix TOC scroll hack for the home page X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d2d0223441d3caad65f6978c07869321bce968e0;p=linux.git docs/sphinx: Fix TOC scroll hack for the home page When on the documentation home page, there won't be any ".current" element since no entry from the TOC was selected yet. That results in a javascript error. Fix that by only trying to set the scrollTop if we have matches for current entries. Signed-off-by: Gustavo Sousa Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240123162157.61819-2-gustavo.sousa@intel.com --- diff --git a/Documentation/sphinx/templates/kernel-toc.html b/Documentation/sphinx/templates/kernel-toc.html index b58efa99df527..41f1efbe64bb2 100644 --- a/Documentation/sphinx/templates/kernel-toc.html +++ b/Documentation/sphinx/templates/kernel-toc.html @@ -12,5 +12,7 @@