fix lint error

Signed-off-by: PotatoCP <kenzieradityatirtarahardja18@gmail.com>
This commit is contained in:
PotatoCP 2025-06-03 11:13:27 +08:00
parent a3d88a93c0
commit c12e21bf3a

View file

@ -846,17 +846,9 @@ pub(crate) fn handle_send_keys_setup(
reply
.send(
find_node_by_unique_id(documents, pipeline, element_id).and_then(|node| {
let file_input = {
if let Some(input_element) = node.downcast::<HTMLInputElement>() {
if input_element.input_type() == InputType::File {
Some(input_element)
} else {
None
}
} else {
None
}
};
let file_input = node
.downcast::<HTMLInputElement>()
.filter(|&input_element| input_element.input_type() == InputType::File);
if file_input.is_none() || strict_file_interactability {
match node.downcast::<HTMLElement>() {
@ -883,7 +875,7 @@ pub(crate) fn handle_send_keys_setup(
// TODO: Check non-typeable form control
return Ok(true);
Ok(true)
}),
)
.unwrap();