From fd7c13b7a2ab597f847da1412b681e2c0a410ee6 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 16 Dec 2025 13:55:24 +0800 Subject: [PATCH] fix: Code editor malfunction (#4523) --- ui/src/components/codemirror-editor/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/src/components/codemirror-editor/index.vue b/ui/src/components/codemirror-editor/index.vue index e275a88d4..3e1361bd3 100644 --- a/ui/src/components/codemirror-editor/index.vue +++ b/ui/src/components/codemirror-editor/index.vue @@ -97,9 +97,13 @@ function getRangeFromLineAndColumn(state: any, line: number, column: number, end } } const asyncLint = throttle(async (view: any) => { + const sendString = view.state.doc.toString() const res = await loadSharedApi({ type: 'tool', systemType: apiType.value }).postPylint( view.state.doc.toString(), ) + if (sendString !== view.state.doc.toString()) { + return [] + } return res.data }, 500)