This commit is contained in:
Timothy J. Baek 2024-09-19 05:15:06 +02:00
parent ed75f72358
commit 27dd6ef14e

View File

@ -115,9 +115,10 @@
$: if (history.currentId !== null) {
let _messages = [];
console.log(history.currentId);
let currentMessage = history.messages[history.currentId];
while (currentMessage !== null) {
while (currentMessage) {
_messages.unshift({ ...currentMessage });
currentMessage =
currentMessage.parentId !== null ? history.messages[currentMessage.parentId] : null;