mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-03 06:12:53 +02:00
fix: empty content check
This commit is contained in:
@@ -382,7 +382,13 @@ export function RoadmapAIChat(props: RoadmapAIChatProps) {
|
||||
return;
|
||||
}
|
||||
|
||||
handleChatSubmit(editorRef.current?.getJSON() || {});
|
||||
const json = editorRef.current?.getJSON();
|
||||
if (!json || isEmptyContent(json)) {
|
||||
toast.error('Please enter a message');
|
||||
return;
|
||||
}
|
||||
|
||||
handleChatSubmit(json);
|
||||
}}
|
||||
>
|
||||
{isStreamingMessage ? (
|
||||
|
Reference in New Issue
Block a user