diff --git a/core/core-frontend/src/views/copilot/index.vue b/core/core-frontend/src/views/copilot/index.vue index 1b572ee930..44de40e519 100644 --- a/core/core-frontend/src/views/copilot/index.vue +++ b/core/core-frontend/src/views/copilot/index.vue @@ -152,7 +152,7 @@ const handleShowLeft = val => { const copilotChatLoading = ref(false) const inputRef = ref() const queryAnswer = (event?: KeyboardEvent) => { - if (event.keyCode === 13) { + if (event?.keyCode === 13) { event.preventDefault() } let copyAuestionInput = questionInput.value