mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-23 07:51:18 +01:00
Use null coalescing operator
This commit is contained in:
parent
dfd41a110a
commit
04c83eae71
@ -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', {
|
||||
|
Loading…
Reference in New Issue
Block a user