From 04c83eae71a72a885225fec257484ff99c2bc1e1 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 9 Dec 2023 16:07:55 +0200 Subject: [PATCH] Use null coalescing operator --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index a89a9ce46..64cb41752 100644 --- a/public/script.js +++ b/public/script.js @@ -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', {