diff --git a/backend/src/api/controllers/result.ts b/backend/src/api/controllers/result.ts
index 05cc53536749..5a174c02c6a6 100644
--- a/backend/src/api/controllers/result.ts
+++ b/backend/src/api/controllers/result.ts
@@ -727,7 +727,7 @@ async function calculateXp(
breakdown.base = baseXp;
let modifier = 1;
-
+ // check if charstats is undefined
const correctedEverything = charStats
.slice(1)
.every((charStat: number) => charStat === 0);
@@ -740,7 +740,6 @@ async function calculateXp(
modifier += 0.25;
breakdown["corrected"] = Math.round(baseXp * 0.25);
}
-
if (mode === "quote") {
// real sentences bonus
modifier += 0.5;
diff --git a/backend/src/utils/result.ts b/backend/src/utils/result.ts
index 8b1b1f25186c..2ac479ee4d6c 100644
--- a/backend/src/utils/result.ts
+++ b/backend/src/utils/result.ts
@@ -22,6 +22,7 @@ export function buildDbResult(
isPb: boolean
): DBResult {
const ce = completedEvent;
+
const res: DBResult = {
_id: new ObjectId(),
uid: ce.uid,
@@ -51,6 +52,7 @@ export function buildDbResult(
bailedOut: ce.bailedOut,
blindMode: ce.blindMode,
name: userName,
+ detailedCharStats: ce.detailedCharStats,
};
//compress object by omitting default values. Frontend will add them back after reading
diff --git a/frontend/src/html/pages/test.html b/frontend/src/html/pages/test.html
index 777d1f7dadc7..a20b2e9a092f 100644
--- a/frontend/src/html/pages/test.html
+++ b/frontend/src/html/pages/test.html
@@ -72,7 +72,6 @@
-
watch replay
@@ -459,6 +483,15 @@
>
+