fix: prevent crash when regenerating message with missing parent (#20264)

This commit is contained in:
G30 authored and GitHub committed 2025-12-30 20:05:55 +04:00
1 parent fe84afd09a
commit b997d00947
1 file changed
+5
+5
View File
@@ -2141,6 +2141,11 @@
if (history.currentId) {
let userMessage = history.messages[message.parentId];
if (!userMessage) {
toast.error($i18n.t('Parent message not found'));
return;
}
if (autoScroll) {
scrollToBottom();
}