chore(docs) fix error

This commit is contained in:
Themba Dube
2021-05-29 16:49:59 -04:00
parent 11f1c5d13f
commit e3ce3a8f5c

View File

@@ -21,10 +21,12 @@ function add_version_selector()
.then(text => {
const versions = text.split("\n").filter(version => version.trim().length > 0);
let p = document.getElementById("rtd-search-form").parentElement;
const versionName = (version.indexOf(".") != -1) ? version : (version + " (latest minor)");
p.innerHTML = `
<select name="versions" id="versions" onchange="ver_sel()" style="border-radius:5px; margin-bottom:15px">
${versions.map(version => `<option value="${version}">${versionName}</option>`)}
${versions.map(version => {
const versionName = (version.indexOf(".") != -1) ? version : (version + " (latest minor)");
return `<option value="${version}">${versionName}</option>`;
})}
</select>` + p.innerHTML;
});
}