mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
Merge pull request #18911 from silentoplayz/fix-chat-preview-bug
fix: correct chat preview loading in chats search modal
This commit is contained in:
commit
1aa285edb9
1 changed files with 5 additions and 7 deletions
|
|
@ -56,12 +56,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadChatPreview = async (selectedIdx) => {
|
const loadChatPreview = async (selectedIdx) => {
|
||||||
if (
|
if (!chatList || chatList.length === 0 || selectedIdx === null) {
|
||||||
!chatList ||
|
|
||||||
chatList.length === 0 ||
|
|
||||||
selectedIdx === null ||
|
|
||||||
chatList[selectedIdx] === undefined
|
|
||||||
) {
|
|
||||||
selectedChat = null;
|
selectedChat = null;
|
||||||
messages = null;
|
messages = null;
|
||||||
history = null;
|
history = null;
|
||||||
|
|
@ -70,8 +65,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedChatIdx = selectedIdx - actions.length;
|
const selectedChatIdx = selectedIdx - actions.length;
|
||||||
if (selectedChatIdx < 0) {
|
if (selectedChatIdx < 0 || selectedChatIdx >= chatList.length) {
|
||||||
selectedChat = null;
|
selectedChat = null;
|
||||||
|
messages = null;
|
||||||
|
history = null;
|
||||||
|
selectedModels = [''];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue