upload_widget: Convert $e.get(0) to $e[0].

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-11-04 17:19:48 -07:00 committed by Tim Abbott
parent 075ad5470a
commit c732a63b2f
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ async function copy_messages(
return await page.evaluate(
(start_message: string, end_message: string) => {
function get_message_node(message: string): Element {
return $(`.message_row .message_content:contains("${CSS.escape(message)}")`).get(0);
return $(`.message_row .message_content:contains("${CSS.escape(message)}")`)[0];
}
// select messages from start_message to end_message

View File

@ -60,7 +60,7 @@ export function build_widget(
if (files === null || files === undefined || files.length === 0) {
return false;
}
get_file_input().get(0).files = files;
get_file_input()[0].files = files;
e.preventDefault();
return false;
});
@ -152,7 +152,7 @@ export function build_direct_upload_widget(
if (files === null || files === undefined || files.length === 0) {
return false;
}
get_file_input().get(0).files = files;
get_file_input()[0].files = files;
e.preventDefault();
return false;
});