Timothy J. Baek 10 月之前
父节点
当前提交
9032ab8857
共有 1 个文件被更改,包括 6 次插入2 次删除
  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 = '';