FIX: Disabled chat breaks `ai-chat-summarization` (#697)

This commit is contained in:
Keegan George 2024-07-02 11:10:31 -07:00 committed by GitHub
parent 1b0ba9197c
commit ef4b3559cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,11 @@ export default apiInitializer("1.34.0", (api) => {
currentUser &&
currentUser.can_summarize;
if (!chatService.userCanChat || !siteSettings.chat_enabled || !canSummarize) {
if (
!siteSettings.chat_enabled ||
!chatService?.userCanChat ||
!canSummarize
) {
return;
}