mirror of https://github.com/zulip/zulip.git
upload_widget: Convert $e.get(0) to $e[0].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
075ad5470a
commit
c732a63b2f
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue