Use null coalescing operator

This commit is contained in:
Cohee 2023-12-09 16:07:55 +02:00
parent dfd41a110a
commit 04c83eae71
1 changed files with 1 additions and 1 deletions

View File

@ -5927,7 +5927,7 @@ export async function getChatsFromFiles(data, isGroupChat) {
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
*/
export async function getPastCharacterChats(characterId = null) {
characterId = characterId || this_chid;
characterId = characterId ?? this_chid;
if (!characters[characterId]) return [];
const response = await fetch('/api/characters/chats', {