change variable scope to block

This commit is contained in:
Wolfgang 2024-05-26 20:21:38 +02:00
parent 2aa403d3c9
commit d43ffbaefb

View file

@ -39,7 +39,7 @@ div>label {
function create_element_link(element, href) {
element.addEventListener("click", () => {
var lnk = document.createElement('a');
let lnk = document.createElement('a');
if (typeof href === "function") {
lnk.href = href();
@ -127,9 +127,9 @@ div>label {
}
function update_table(bases, extensions) {
var tdata = [];
var base_header = {};
var ext_header = {};
let tdata = [];
let base_header = {};
let ext_header = {};
// first, fill base_header
bases.forEach((base) => {
@ -208,7 +208,7 @@ div>label {
// require in tabular-tables
// eslint-disable-next-line no-undef
var table = new Tabulator("#data-table", {
let table = new Tabulator("#data-table", {
layout: "fitDataTable",
initialSort: [
{column: "frequency", dir: "asc"},
@ -257,7 +257,7 @@ div>label {
});
table.on("tableBuilt", () => {
var div_togglebuttons = document.getElementById("togglebuttons");
let div_togglebuttons = document.getElementById("togglebuttons");
div_togglebuttons.innerHTML = "<span>Toggle column:</span>";
table.getColumns().forEach((col) => {
let col_name = col.getField();