ReadtheDocs theme TOC scroll bug (#1193)
ReadtheDocs theme TOC scroll bug (#1193)

Fixes a JavaScript error when looking for a current page in the TOC
when there is not a current page selected, in the case of Search, 404
or any page that isn’t listed in the TOC. This checks if a TOC item
with the class of ‘current’ is in the document, and if not, does not
call the viewport check or scroll the TOC area.

Fixes #1177.
waylan/mkdocs,mkdocs/mkdocs,lukfor/mkdocs,lukfor/mkdocs,waylan/mkdocs,lukfor/mkdocs,waylan/mkdocs,jimporter/mkdocs,mkdocs/mkdocs,jimporter/mkdocs,jimporter/mkdocs,mkdocs/mkdocs