Replace uses of var with let or const as appropriate

This commit is contained in:
Tom Hughes 2025-01-26 19:06:27 +00:00
parent f83424aeb2
commit c47cb299a8
36 changed files with 427 additions and 430 deletions

View file

@ -1,7 +1,7 @@
L.OSM.sidebar = function (selector) {
var control = {},
sidebar = $(selector),
current = $(),
const control = {},
sidebar = $(selector);
let current = $(),
currentButton = $(),
map;
@ -17,9 +17,9 @@ L.OSM.sidebar = function (selector) {
};
control.togglePane = function (pane, button) {
var mediumDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md");
var isMediumDevice = window.matchMedia(`(max-width: ${mediumDeviceWidth})`).matches;
var paneWidth = 250;
const mediumDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md");
const isMediumDevice = window.matchMedia(`(max-width: ${mediumDeviceWidth})`).matches;
const paneWidth = 250;
current
.hide()