mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02: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:
@ -5520,7 +5520,7 @@ export async function getChatsFromFiles(data, isGroupChat) {
|
|||||||
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
||||||
*/
|
*/
|
||||||
async function getPastCharacterChats() {
|
async function getPastCharacterChats() {
|
||||||
if (!characters.includes(this_chid)) return;
|
if (!characters[this_chid]) return;
|
||||||
|
|
||||||
const response = await fetch("/getallchatsofcharacter", {
|
const response = await fetch("/getallchatsofcharacter", {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
Reference in New Issue
Block a user