From 192a1f40147451a5ab94581710bac4c1caa588b0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:41:04 +0200 Subject: [PATCH] getContext: Simplify chatId access --- public/scripts/st-context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/st-context.js b/public/scripts/st-context.js index 6d509ee09..487c502ee 100644 --- a/public/scripts/st-context.js +++ b/public/scripts/st-context.js @@ -80,7 +80,7 @@ export function getContext() { groupId: selected_group, chatId: selected_group ? groups.find(x => x.id == selected_group)?.chat_id - : (this_chid && characters[this_chid] && characters[this_chid].chat), + : (characters[this_chid]?.chat), getCurrentChatId, getRequestHeaders, reloadCurrentChat,