mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-02 20:36:49 +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.
|
* in descending order by file name. Returns `undefined` if the fetch request is unsuccessful.
|
||||||
*/
|
*/
|
||||||
export async function getPastCharacterChats(characterId = null) {
|
export async function getPastCharacterChats(characterId = null) {
|
||||||
characterId = characterId || this_chid;
|
characterId = characterId ?? this_chid;
|
||||||
if (!characters[characterId]) return [];
|
if (!characters[characterId]) return [];
|
||||||
|
|
||||||
const response = await fetch('/api/characters/chats', {
|
const response = await fetch('/api/characters/chats', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user