Apply suggestions from code review
change variable declaration in login-events.js to const Co-authored-by: André Staltz <andre@staltz.com>
This commit is contained in:
parent
1dd3f2891e
commit
544c05b290
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue