mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-27 23:59:20 -05:00
fix: prevent crash when regenerating message with missing parent (#20264)
This commit is contained in:
1 file changed
+5
@@ -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