Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
change variable declaration in login-events.js to const

Co-authored-by: André Staltz <[email protected]>
  • Loading branch information
cryptix and staltz authored Mar 26, 2021
1 parent 1dd3f28 commit 544c05b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/assets/login-events.js
Original file line number Diff line number Diff line change
@@ -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."
Expand Down

0 comments on commit 544c05b

Please sign in to comment.