From 6d91adcaccb19efbae53a72a6b9130e6139155a9 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 23 Sep 2020 22:34:52 +0100 Subject: [PATCH] fixed raw error --- public/js/account.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/js/account.js b/public/js/account.js index 40c7be3d9..8a5efbb5e 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -1631,8 +1631,13 @@ function loadMoreLines() { diff = "normal"; } - let raw = result.rawWpm; - if (raw == undefined) { + let raw; + try{ + raw = result.rawWpm.toFixed(2); + if (raw == undefined) { + raw = "-"; + } + } catch (e) { raw = "-"; } @@ -1723,7 +1728,7 @@ function loadMoreLines() { $(".pageAccount .history table tbody").append(` ${result.wpm.toFixed(2)} - ${raw.toFixed(2)} + ${raw} ${result.acc.toFixed(2)}% ${result.correctChars} ${result.incorrectChars}