fix: prevent crash when regenerating message with missing parent (#20264)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user