Update src/core/persistence.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user