diff --git a/public/index.html b/public/index.html index 68a4bd684..ed7b9af4e 100644 --- a/public/index.html +++ b/public/index.html @@ -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)
diff --git a/public/js/account.js b/public/js/account.js index 446fd1b5e..7262335f3 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -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;