Fix potential use-before-init
This commit is contained in:
parent
2a579b53fd
commit
6342e8c68f
@ -152,13 +152,13 @@ async function besProof(el) {
|
||||
function besHandleBeforeInput(editorId, event) {
|
||||
let editor = besEditors[editorId]
|
||||
if (editor.timer) clearTimeout(editor.timer)
|
||||
let edit = document.getElementById(editorId)
|
||||
editor.timer = setTimeout(function () {
|
||||
besProof(edit)
|
||||
}, 1000)
|
||||
|
||||
// No need to invalidate elements after range.startContainer since they will
|
||||
// get either deleted or replaced.
|
||||
let edit = document.getElementById(editorId)
|
||||
event
|
||||
.getTargetRanges()
|
||||
.forEach(range =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user