Skip to content

Commit 002c468

Browse files
committed
fix
1 parent a18b081 commit 002c468

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

header.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
const TRUNK_VERSION = "trunk/develop";
22
const NONE_VERSION = "none"
33

4+
function loadVersions() {
5+
return import('/versions.js').then((imported_versions_module) => {
6+
versions = imported_versions_module.versions
7+
return versions
8+
});
9+
}
10+
411

512
const addModal = () => {
613
const modalHandler = () => {
@@ -143,7 +150,8 @@ const floor_to_major_version = (versions, target_version) => {
143150
}
144151

145152
const add_docs_versioning = () => {
146-
import('/versions.js').then(() => {
153+
154+
loadVersions().then((versions) => {
147155
const latest_version = versions[versions.length - 1]
148156
let second_likely_popular_version = floor_to_major_version(versions, latest_version)
149157

0 commit comments

Comments
 (0)