Skip to content

Commit 43e0bc7

Browse files
committed
refactor: move const inside an if
1 parent 54b9220 commit 43e0bc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/ts/input/handlers/insert-text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ type OnInsertTextParams = {
6262

6363
export async function onInsertText(options: OnInsertTextParams): Promise<void> {
6464
const { now, lastInMultiIndex, isCompositionEnding } = options;
65-
const { inputValue } = getInputElementValue();
6665

6766
if (options.data.length > 1) {
6867
// remove the entire data from the input value
6968
// make sure to not call TestInput.input.syncWithInputElement in here
7069
// it will be updated later in the body of onInsertText
70+
const { inputValue } = getInputElementValue();
7171
setInputElementValue(inputValue.slice(0, -options.data.length));
7272
for (let i = 0; i < options.data.length; i++) {
7373
const char = options.data[i] as string;

0 commit comments

Comments
 (0)