last-ditch effort to make js not multithread everything

This commit is contained in:
Jacob Levine 2019-02-09 13:01:14 -06:00
parent 807c66dd3a
commit 0b0d36d660
2 changed files with 13 additions and 6 deletions

View File

@ -23,9 +23,13 @@ window.onload = function() {
storageBucket: "titanscoutandroid.appspot.com",
messagingSenderId: "1097635313476"
};
//eventually find a less-jank way to do this tho
firebase.initializeApp(config);
setTimeout(function(){
user = firebase.auth().currentUser
resolve(user)
},10)
});
promise1.then(function(user) {
if (user != null) {

View File

@ -23,12 +23,15 @@ window.onload = function() {
storageBucket: "titanscoutandroid.appspot.com",
messagingSenderId: "1097635313476"
};
//eventually find a less-jank way to do this tho
firebase.initializeApp(config);
setTimeout(function(){
user = firebase.auth().currentUser
resolve(null)
resolve(user)
},10)
});
promise1.then(function(a) {
user=firebase.auth().currentUser
promise1.then(function(user) {
if (user != null) {
if (user.displayName != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;