mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
made sure to use the correct field name
This commit is contained in:
parent
56abd0661a
commit
9f6466cb43
|
@ -466,15 +466,15 @@ function refreshAccountPage() {
|
|||
|
||||
|
||||
let tt = 0;
|
||||
if(result.timeDuration == null){
|
||||
//test finished before timeduration field was introduced - estimate
|
||||
if(result.testDuration == undefined){
|
||||
//test finished before testDuration field was introduced - estimate
|
||||
if(result.mode == "time"){
|
||||
tt = parseFloat(result.mode2);
|
||||
}else if(result.mode == "words"){
|
||||
tt = (parseFloat(result.mode2)/parseFloat(result.wpm)) * 60;
|
||||
}
|
||||
}else{
|
||||
tt = parseFloat(result.timeDuration);
|
||||
tt = parseFloat(result.testDuration);
|
||||
}
|
||||
if(result.restartCount != null){
|
||||
tt += (tt/4) * result.restartCount;
|
||||
|
|
Loading…
Reference in a new issue