Update src/core/persistence.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Spicy Marinara
2026-02-26 01:47:42 +01:00
committed by GitHub
parent 9213d264a0
commit 8ea9044492
+7 -1
View File
@@ -331,7 +331,13 @@ export function commitTrackerDataFromPriorMessage(currentMessageIndex) {
const swipeData = getSwipeData(message, swipeId); const swipeData = getSwipeData(message, swipeId);
committedTrackerData.userStats = swipeData?.userStats || null; committedTrackerData.userStats = swipeData?.userStats || null;
committedTrackerData.infoBox = swipeData?.infoBox || null; committedTrackerData.infoBox = swipeData?.infoBox || null;
committedTrackerData.characterThoughts = swipeData?.characterThoughts || null; const rawCharacterThoughts = swipeData?.characterThoughts;
committedTrackerData.characterThoughts =
rawCharacterThoughts == null
? null
: (typeof rawCharacterThoughts === 'string'
? rawCharacterThoughts
: JSON.stringify(rawCharacterThoughts));
return; return;
} }