Fixing use const instead of let

This commit is contained in:
David Négrier 2020-06-09 23:13:26 +02:00
parent 54f2518b5e
commit 8348d13bfe
17 changed files with 116 additions and 116 deletions

View file

@ -2,7 +2,7 @@ export class MessageUI {
static warningMessage(text: string){
this.removeMessage();
let body = document.getElementById("body");
const body = document.getElementById("body");
body?.insertAdjacentHTML('afterbegin', `
<div id="message-reconnect" class="message-info warning">
${text}
@ -12,13 +12,13 @@ export class MessageUI {
static removeMessage(id : string|null = null) {
if(!id){
let messages = document.getElementsByClassName("message-info");
const messages = document.getElementsByClassName("message-info");
for (let i = 0; i < messages.length; i++){
messages.item(i)?.remove();
}
return;
}
let previousElement = document.getElementById(id);
const previousElement = document.getElementById(id);
if (!previousElement) {
return;
}