diff --git a/frontend_tests/puppeteer_tests/copy-and-paste.ts b/frontend_tests/puppeteer_tests/copy-and-paste.ts index 8629edb86c..6c53ba54c7 100644 --- a/frontend_tests/puppeteer_tests/copy-and-paste.ts +++ b/frontend_tests/puppeteer_tests/copy-and-paste.ts @@ -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 diff --git a/static/js/upload_widget.ts b/static/js/upload_widget.ts index c6c6de8ab5..ca175597ec 100644 --- a/static/js/upload_widget.ts +++ b/static/js/upload_widget.ts @@ -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; });