From 8e3f7d1e659c971fe718b6dccd0b904ed2c0d35a Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 28 Apr 2015 19:28:58 +0300 Subject: [PATCH] Fix 95-login.js --- js/95-login.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/95-login.js b/js/95-login.js index bf16d31..d08150a 100644 --- a/js/95-login.js +++ b/js/95-login.js @@ -7,9 +7,9 @@ $(function(){ var xhr = new XMLHttpRequest(); xhr.open('GET', '/login'); xhr.onload = () => { - if(this.status != 200) + if(xhr.status != 200) return; - var username = this.responseText; + var username = xhr.responseText; sessionStorage.setItem('login_username', username); start_tracking(username); login.innerHTML = 'Probably logged in as ' + username; -- 2.39.2