[Bf-blender-cvs] [a0c1306e8c7] blender-v3.1-release: Py Docs: Fix error is version switch

Aaron Carlisle noreply at git.blender.org
Thu Feb 3 21:22:10 CET 2022


Commit: a0c1306e8c7673f365e1907cacff86f788e08cef
Author: Aaron Carlisle
Date:   Thu Feb 3 15:21:44 2022 -0500
Branches: blender-v3.1-release
https://developer.blender.org/rBa0c1306e8c7673f365e1907cacff86f788e08cef

Py Docs: Fix error is version switch

Slile parameter of 4 was looking for the language in the URL but the API docs do not have a language in the URL.

===================================================================

M	doc/python_api/static/js/version_switch.js

===================================================================

diff --git a/doc/python_api/static/js/version_switch.js b/doc/python_api/static/js/version_switch.js
index 7d9c449d2e3..d69b17c31bb 100644
--- a/doc/python_api/static/js/version_switch.js
+++ b/doc/python_api/static/js/version_switch.js
@@ -126,7 +126,7 @@ var Popover = function() {
       var url = new URL(window.location.href);
       let pathSplit = [ "", "api", v ];
       if (url.pathname.startsWith("/api/")) {
-        pathSplit.push(url.pathname.split('/').slice(4).join('/'));
+        pathSplit.push(url.pathname.split('/').slice(3).join('/'));
       }
       else {
         pathSplit.push(url.pathname.substring(1));



More information about the Bf-blender-cvs mailing list