fix: Code editor malfunction (#4523)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-12-16 13:55:24 +08:00 committed by GitHub
parent 38191f70b4
commit fd7c13b7a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)