From 498f385e29b622d6dec50fdf82286a48f60b4241 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 15 Nov 2024 17:30:29 +0800 Subject: [PATCH] lint --- src/libs/InputUtils/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/InputUtils/index.ts b/src/libs/InputUtils/index.ts index b7ad4bb7439f..760bda3ac798 100644 --- a/src/libs/InputUtils/index.ts +++ b/src/libs/InputUtils/index.ts @@ -12,8 +12,9 @@ const moveSelectionToEnd: MoveSelectiontoEnd = (input) => { if (!('setSelectionRange' in input)) { return; } - const length = (input as HTMLInputElement).value.length; - input.setSelectionRange(length, length); + const inputElement = input as HTMLInputElement; + const length = inputElement.value.length; + inputElement.setSelectionRange(length, length); }; export {scrollToBottom, moveSelectionToEnd};