diff --git a/web/src/layouts/ChatLayout/ChatContainer/ChatHeader/ChatHeaderOptions/ChatHeaderDropdown.tsx b/web/src/layouts/ChatLayout/ChatContainer/ChatHeader/ChatHeaderOptions/ChatHeaderDropdown.tsx index fd0cd68fb..31bf99f01 100644 --- a/web/src/layouts/ChatLayout/ChatContainer/ChatHeader/ChatHeaderOptions/ChatHeaderDropdown.tsx +++ b/web/src/layouts/ChatLayout/ChatContainer/ChatHeader/ChatHeaderOptions/ChatHeaderDropdown.tsx @@ -24,7 +24,7 @@ export const ChatContainerHeaderDropdown: React.FC<{ const currentMessageId = useChatIndividualContextSelector((state) => state.currentMessageId); const selectedFileId = useChatIndividualContextSelector((state) => state.selectedFileId); const selectedFileType = useChatIndividualContextSelector((state) => state.selectedFileType); - const { data: chatTitle } = useGetChat({ id: chatId || '' }, { select: (x) => x.title }); + const { data: chatTitle } = useGetChat({ id: chatId || '' }, { select: (x) => x.title, enabled: !!chatId }); const { isFavorited, onFavoriteClick } = useFavoriteStar({ id: chatId || '',