mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-12 10:00:36 +01:00
Chats: Fix past chat fetching
Includes checks if an element of the array includes a character ID, but the array contains characters. We want to check if the value at the specified index exists in the first place. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
00c029a65a
commit
8155b1c365
@ -5520,7 +5520,7 @@ export async function getChatsFromFiles(data, isGroupChat) {
|
||||
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
||||
*/
|
||||
async function getPastCharacterChats() {
|
||||
if (!characters.includes(this_chid)) return;
|
||||
if (!characters[this_chid]) return;
|
||||
|
||||
const response = await fetch("/getallchatsofcharacter", {
|
||||
method: 'POST',
|
||||
|
Loading…
x
Reference in New Issue
Block a user