File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,15 @@ const _CURRENT_PREFIX = (() => {
17
17
const all_versions = $VERSIONS ;
18
18
const all_languages = $LANGUAGES ;
19
19
20
- const _create_version_select = ( release ) => {
21
- const major_minor = release . split ( '.' ) . slice ( 0 , 2 ) . join ( '.' ) ;
20
+ const _create_version_select = ( ) => {
22
21
const select = document . createElement ( 'select' ) ;
23
22
select . className = 'version-select' ;
24
23
25
24
for ( const [ version , title ] of Object . entries ( all_versions ) ) {
26
25
const option = document . createElement ( 'option' ) ;
27
26
option . value = version ;
28
- if ( version === major_minor ) {
29
- option . text = release ;
27
+ if ( version === _CURRENT_VERSION ) {
28
+ option . text = _CURRENT_RELEASE ;
30
29
option . selected = true ;
31
30
} else {
32
31
option . text = title ;
@@ -124,7 +123,7 @@ const _on_language_switch = (event) => {
124
123
} ;
125
124
126
125
const _initialise_switchers = ( ) => {
127
- const version_select = _create_version_select ( _CURRENT_VERSION ) ;
126
+ const version_select = _create_version_select ( ) ;
128
127
document
129
128
. querySelectorAll ( '.version_switcher_placeholder' )
130
129
. forEach ( ( placeholder ) => {
You can’t perform that action at this time.
0 commit comments