Timothy J. Baek 10 months ago
parent
commit
9032ab8857
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/lib/components/chat/Chat.svelte

+ 6 - 2
src/lib/components/chat/Chat.svelte

@@ -297,8 +297,12 @@
 
 	const submitPrompt = async (userPrompt, _user = null) => {
 		// Reset chat input textarea
-		document.getElementById('chat-textarea').value = '';
-		document.getElementById('chat-textarea').style.height = '';
+		const chatTextAreaElement = document.getElementById('chat-textarea');
+
+		if (chatTextAreaElement) {
+			chatTextAreaElement.value = '';
+			chatTextAreaElement.style.height = '';
+		}
 
 		prompt = '';