mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-11 01:15:49 +08:00
hopefully fixed the 'dlb is null' error
This commit is contained in:
parent
2e05212613
commit
50bed0599c
1 changed files with 4 additions and 2 deletions
|
@ -2121,11 +2121,12 @@ function showResult(difficultyFailed = false) {
|
|||
const glbMemory =
|
||||
dbSnapshot.lbMemory[config.mode + mode2].global;
|
||||
let dontShowGlobalDiff =
|
||||
glbMemory == null || glbMemory === -1 || glb.insertedAt === -1 ? true : false;
|
||||
glbMemory == null || glbMemory === -1 ? true : false;
|
||||
let globalLbDiff = null;
|
||||
if (glb === null) {
|
||||
globalLbString = "global: not found";
|
||||
} else if (glb.insertedAt === -1) {
|
||||
dontShowGlobalDiff = true;
|
||||
globalLbDiff = glbMemory - glb.insertedAt;
|
||||
updateLbMemory(
|
||||
config.mode,
|
||||
|
@ -2176,11 +2177,12 @@ function showResult(difficultyFailed = false) {
|
|||
const dlbMemory =
|
||||
dbSnapshot.lbMemory[config.mode + mode2].daily;
|
||||
let dontShowDailyDiff =
|
||||
dlbMemory == null || dlbMemory === -1 || dlb.insertedAt === -1 ? true : false;
|
||||
dlbMemory == null || dlbMemory === -1 ? true : false;
|
||||
let dailyLbDiff = null;
|
||||
if (dlb === null) {
|
||||
dailyLbString = "daily: not found";
|
||||
} else if (dlb.insertedAt === -1) {
|
||||
dontShowDailyDiff = true;
|
||||
dailyLbDiff = dlbMemory - dlb.insertedAt;
|
||||
updateLbMemory(
|
||||
config.mode,
|
||||
|
|
Loading…
Reference in a new issue