diff --git a/docs/python_docs/_static/autodoc.js b/docs/python_docs/_static/autodoc.js
index 0825f54ea143..5b536ddcf6ae 100644
--- a/docs/python_docs/_static/autodoc.js
+++ b/docs/python_docs/_static/autodoc.js
@@ -20,30 +20,32 @@
/* Customizations to the Sphinx auto module plugin output */
function auto_index() {
var targets = $("dl.class>dt,dl.function>dt");
-
var li_node = $("li.current>span>a.current.reference.internal").parent().parent();
var html = "
";
if (li_node.length > 0) {
- for (var i = 0; i < targets.length; ++i) {
- var id = $(targets[i]).attr('id');
- if (id) {
- var paths = id.split('.')
- if (paths.length >= 2) {
- var id_simple = paths.pop();
- id_simple = paths.pop() + "." + id_simple;
- } else {
- var id_simple = id;
+ if (targets.length > 0) {
+ for (var i = 0; i < targets.length; ++i) {
+ var id = $(targets[i]).attr('id');
+ if (id) {
+ var paths = id.split('.')
+ if (paths.length >= 2) {
+ var id_simple = paths.pop();
+ id_simple = paths.pop() + "." + id_simple;
+ } else {
+ var id_simple = id;
+ }
+ html += "- " + id_simple + "";
}
- html += "
- " + id_simple + "";
}
+ html += "
";
+ li_node.append(html);
+ li_node.prepend("[toggle]")
}
- html += "";
- li_node.append(html);
- li_node.prepend("[toggle]")
} else {
setTimeout(auto_index, 500);
}
+
}
$(document).ready(auto_index);
\ No newline at end of file