Skip to content

Commit e11cb25

Browse files
miyukocwhitequark
authored andcommitted
docs: fix version switch always showing the current version the first.
1 parent 53d88ad commit e11cb25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_static/version-switch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ document.addEventListener('DOMContentLoaded', () => {
7373
document.adoptedStyleSheets.push(cssStyleSheet);
7474

7575
let currentVersion = DOCUMENTATION_OPTIONS.VERSION;
76-
if (!versions.includes(currentVersion)) {
76+
if (!versions.some(({ name }) => name === currentVersion)) {
7777
versions = [
7878
{ name: currentVersion, root_url: contentRoot },
7979
...versions,

0 commit comments

Comments
 (0)