fix: Code editor malfunction (#4523)

This commit is contained in:
shaohuzhang1 2025-12-16 13:55:24 +08:00 committed by shaohuzhang1
parent 5a546cb525
commit dba257049e

View File

@ -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)