diff --git a/website/public/team/scripts.js b/website/public/team/scripts.js index 3aaac641..e4d58754 100644 --- a/website/public/team/scripts.js +++ b/website/public/team/scripts.js @@ -48,13 +48,13 @@ window.onload = function() { window.location.replace('../'); } teamAssoc = firebase.firestore().collection('UserAssociations').doc(user.uid); - teamAssoc.get().then(function(doc) { + teamAssoc.get()..then(function(doc) { if (doc.exists) { list = doc.data() teamNums = Object.keys(list) document.getElementById('teammem').innerHTML = "" for (var i = 0; i < teamNums.length; i++) { - document.getElementById('teammem').innerHTML += "" + teamNums[i] + "" + list[teamNums[i]] + "" + document.getElementById('teammem').innerHTML += "" + teamNums[i] + "" + list[teamNums[i]] + "" + "" } } else { document.getElementById('teammem').innerHTML = "You are not part of any teams" @@ -162,20 +162,20 @@ function leaveTeam(tn) { }) } - function signout() { - var user = firebase.auth().currentUser; - firebase.auth().signOut().then( - window.location.href = '../'); - } +function signout() { + var user = firebase.auth().currentUser; + firebase.auth().signOut().then( + window.location.href = '../'); +} - function deleteAccount() { - try { - firebase.auth().currentUser.delete().then( - window.location.href = '../'); - } catch (error) { - if (error.code == 'auth/requires-recent-login') { - alert("Please sign in again to delete your account.") - window.location.href = '../'; - } +function deleteAccount() { + try { + firebase.auth().currentUser.delete().then( + window.location.href = '../'); + } catch (error) { + if (error.code == 'auth/requires-recent-login') { + alert("Please sign in again to delete your account.") + window.location.href = '../'; } } +}