Skip to content

Commit d1b7ad8

Browse files
committed
Fix _CURRENT_VERSION for pre-releases
1 parent 1179ee9 commit d1b7ad8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/switchers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

3-
const _CURRENT_VERSION = DOCUMENTATION_OPTIONS.VERSION;
3+
const _CURRENT_RELEASE = DOCUMENTATION_OPTIONS.VERSION || '';
4+
const _CURRENT_VERSION = _CURRENT_RELEASE.split('.', 2).join('.');
45
const _CURRENT_LANGUAGE = DOCUMENTATION_OPTIONS.LANGUAGE?.toLowerCase() || 'en';
56
const _CURRENT_PREFIX = (() => {
67
// Sphinx 7.2+ defines the content root data attribute in the HTML element.

0 commit comments

Comments
 (0)