aboutsummaryrefslogtreecommitdiff
path: root/docs/_static
diff options
context:
space:
mode:
authorJosh <[email protected]>2020-08-30 16:55:53 +1000
committerRapptz <[email protected]>2020-12-18 21:18:57 -0500
commit2ad87dbff6e2c0aebfa46ddc7d7a5c3b998dba9f (patch)
treeb61ff5eed64e0734dfeef3c0d8c83bdd62d35420 /docs/_static
parentAnother take at fixing methods showing up under "Attributes" (diff)
downloaddiscord.py-2ad87dbff6e2c0aebfa46ddc7d7a5c3b998dba9f.tar.xz
discord.py-2ad87dbff6e2c0aebfa46ddc7d7a5c3b998dba9f.zip
[matrix] Fix JS errors on search results page
Diffstat (limited to 'docs/_static')
-rw-r--r--docs/_static/custom.js4
-rw-r--r--docs/_static/sidebar.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/docs/_static/custom.js b/docs/_static/custom.js
index 95d1539b..b3712f4a 100644
--- a/docs/_static/custom.js
+++ b/docs/_static/custom.js
@@ -25,7 +25,7 @@ class Modal {
}
}
-class Search {
+class SearchBar {
constructor() {
this.box = document.querySelector('nav.mobile-only');
@@ -50,7 +50,7 @@ class Search {
}
document.addEventListener('DOMContentLoaded', () => {
- mobileSearch = new Search();
+ mobileSearch = new SearchBar();
bottomHeightThreshold = document.documentElement.scrollHeight - 30;
sections = document.querySelectorAll('section');
diff --git a/docs/_static/sidebar.js b/docs/_static/sidebar.js
index a08a3f21..c44518f5 100644
--- a/docs/_static/sidebar.js
+++ b/docs/_static/sidebar.js
@@ -23,6 +23,9 @@ class Sidebar {
createCollapsableSections() {
let toc = this.element.querySelector('ul');
+ if (!toc) {
+ return
+ }
let allReferences = toc.querySelectorAll('a.reference.internal:not([href="#"])');
for (let ref of allReferences) {