We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66fe4bd + f082ca1 commit 7f3573aCopy full SHA for 7f3573a
readthedocs/doc_builder/templates/doc_builder/data.js.tmpl
@@ -6,5 +6,9 @@ var doc_slug = "{{ slug }}";
6
var page_name = "{{ pagename }}";
7
var html_theme = "{{ html_theme }}";
8
9
-READTHEDOCS_DATA["page"] = mkdocs_page_input_path.substr(
10
- 0, mkdocs_page_input_path.lastIndexOf(READTHEDOCS_DATA.source_suffix));
+// mkdocs_page_input_path is only defined on the RTD mkdocs theme but it isn't
+// available on all pages (e.g. missing in search result)
11
+if (typeof mkdocs_page_input_path !== "undefined") {
12
+ READTHEDOCS_DATA["page"] = mkdocs_page_input_path.substr(
13
+ 0, mkdocs_page_input_path.lastIndexOf(READTHEDOCS_DATA.source_suffix));
14
+}
0 commit comments