From 544c05b2908441e6a4789c345583e6a2f993c1fb Mon Sep 17 00:00:00 2001 From: Henry <111202+cryptix@users.noreply.github.com> Date: Fri, 26 Mar 2021 14:49:04 +0100 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit change variable declaration in login-events.js to const Co-authored-by: André Staltz --- web/assets/login-events.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/assets/login-events.js b/web/assets/login-events.js index bbeba6fe..12ec2b5d 100644 --- a/web/assets/login-events.js +++ b/web/assets/login-events.js @@ -1,9 +1,9 @@ // get the challenge from out of the HTML -let sc = document.querySelector("#challenge").dataset.sc -var evtSource = new EventSource(`/withssb/events?sc=${sc}`); +const sc = document.querySelector("#challenge").dataset.sc +const evtSource = new EventSource(`/withssb/events?sc=${sc}`); -var ping = document.querySelector('#ping'); -var failed = document.querySelector('#failed'); +const ping = document.querySelector('#ping'); +const failed = document.querySelector('#failed'); evtSource.onerror = (e) => { failed.textContent = "Warning: The connection to the server was interupted."