From 6c55e9fc32d342d63208897a4f2128c30c069c01 Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Wed, 1 Jul 2020 11:02:59 -0400 Subject: [PATCH] Fix dropdown bug in searches (#5440) * Trigger CI * Fix dropdown bug in searches --- docs/source/_static/js/custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/_static/js/custom.js b/docs/source/_static/js/custom.js index b5e958af54..da4806c600 100644 --- a/docs/source/_static/js/custom.js +++ b/docs/source/_static/js/custom.js @@ -87,7 +87,7 @@ function addVersionControl() { const parts = location.toString().split('/'); let versionIndex = parts.length - 2; // Index page may not have a last part with filename.html so we need to go up - if (parts[parts.length - 1] != "" && ! parts[parts.length - 1].match(/\.html$/)) { + if (parts[parts.length - 1] != "" && ! parts[parts.length - 1].match(/\.html$|^search.html?/)) { versionIndex = parts.length - 1; } // Main classes and models are nested so we need to go deeper