mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-10 14:01:22 -06:00
Fix #1331 Pages excluded from the navigation do not have a second (page-specific) stylesheet in the head. When JS is enabled, an error arises when such a page is loaded, due to `initNav()` trying to disable a non-existent stylesheet. This PR stops JS trying to disable the second stylesheet when it doesn't exist. Note that issue #1331 was reported in connection with optimising the build of the endoflife.date site by following [my suggestion](https://github.com/just-the-docs/just-the-docs/pull/1244#issuecomment-1660246728) in #1244, but the bug also appears on the theme website at https://just-the-docs.com/404.html.