From 489c13e951b5fc60d86d31bef7a7058e317e9401 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Tue, 16 Dec 2025 13:53:59 +0800 Subject: [PATCH] fix: Code editor malfunction --- 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 e275a88d4e9..3e1361bd320 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)