fixed typos

fixed a bug with account page not loading
This commit is contained in:
Jack 2020-08-25 01:41:20 +01:00
parent f4b75e42bf
commit 489322587f
2 changed files with 16 additions and 12 deletions

View file

@ -1277,7 +1277,7 @@
info. (you can hover over some values to get floating point
numbers). You can also see a graph of your wpm and raw over the
duration of the test. Remember that the wpm line is a global
average, while the wpm line is a local, momentary raw value.
average, while the raw wpm line is a local, momentary value.
(meaning if you stop, the value is 0)
</p>
</div>

View file

@ -265,19 +265,23 @@ firebase.auth().onAuthStateChanged(function (user) {
} else {
accountIconLoading(false);
}
if (
config.resultFilters === undefined ||
config.resultFilters === null ||
config.resultFilters.difficulty === undefined
) {
try {
if (
dbSnapshot.config.resultFilters == null ||
dbSnapshot.config.resultFilters.difficulty === undefined
config.resultFilters === undefined ||
config.resultFilters === null ||
config.resultFilters.difficulty === undefined
) {
config.resultFilters = defaultAccountFilters;
} else {
config.resultFilters = dbSnapshot.config.resultFilters;
if (
dbSnapshot.config.resultFilters == null ||
dbSnapshot.config.resultFilters.difficulty === undefined
) {
config.resultFilters = defaultAccountFilters;
} else {
config.resultFilters = dbSnapshot.config.resultFilters;
}
}
} catch (e) {
config.resultFilters = defaultAccountFilters;
}
if ($(".pageLogin").hasClass("active")) {
changePage("account");
@ -293,7 +297,7 @@ firebase.auth().onAuthStateChanged(function (user) {
})
.catch((e) => {
accountIconLoading(false);
showNotification("Error donwloading user data: " + e, 5000);
showNotification("Error downloading user data: " + e, 5000);
});
var displayName = user.displayName;
var email = user.email;