ace2_inner: Use destructuring assignment to simplify

pull/5153/head
Richard Hansen 2021-06-21 19:25:24 -04:00
parent c7be4f9d2d
commit 98c1ba5808
1 changed files with 1 additions and 6 deletions

View File

@ -2579,12 +2579,7 @@ function Ace2Inner(editorInfo, cssManagers) {
const handleKeyEvent = (evt) => { const handleKeyEvent = (evt) => {
if (!isEditable) return; if (!isEditable) return;
const type = evt.type; const {type, charCode, keyCode, which, altKey, shiftKey} = evt;
const charCode = evt.charCode;
const keyCode = evt.keyCode;
const which = evt.which;
const altKey = evt.altKey;
const shiftKey = evt.shiftKey;
// Don't take action based on modifier keys going up and down. // Don't take action based on modifier keys going up and down.
// Modifier keys do not generate "keypress" events. // Modifier keys do not generate "keypress" events.