Use const in more places

This commit is contained in:
Maximilian Krög
2022-08-09 00:04:31 +02:00
parent bebf2db5ae
commit 5b8d810f80
18 changed files with 108 additions and 110 deletions

View File

@@ -192,7 +192,7 @@
const storageKey = 'ol-dismissed=-' + latestVersion;
const dismissed = localStorage.getItem(storageKey) === 'true';
if (branchSearch && !dismissed && /^v[0-9\.]*$/.test(branchSearch[1]) && '{{ olVersion }}' != latestVersion) {
var link = url.replace(branchSearch[0], '/latest/examples/');
const link = url.replace(branchSearch[0], '/latest/examples/');
fetch(link, {method: 'head'}).then(function(response) {
const a = document.getElementById('latest-link');
a.href = response.status == 200 ? link : '../../latest/examples/';