From a1b589ff0f4843c8bab7fcc2e5010890b7abd8cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:32:57 +0000 Subject: [PATCH 1/2] Initial plan From 8730363d2958bbb2f8e8ed1d7bd1554e4652d0b1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 19:37:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20typo:=20pendingRquests=20=E2=86=92=20?= =?UTF-8?q?pendingRequests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: codingjoe <1772890+codingjoe@users.noreply.github.com> --- s3file/static/s3file/js/s3file.js | 6 +++--- tests/__tests__/s3file.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/s3file/static/s3file/js/s3file.js b/s3file/static/s3file/js/s3file.js index a54917c..3e3b6dc 100644 --- a/s3file/static/s3file/js/s3file.js +++ b/s3file/static/s3file/js/s3file.js @@ -217,15 +217,15 @@ export class S3FileInput extends globalThis.HTMLElement { async submitHandler(event) { event.preventDefault() this.form?.dispatchEvent(new window.CustomEvent("upload")) - await Promise.all(this.form?.pendingRquests) + await Promise.all(this.form?.pendingRequests) this.form?.requestSubmit(event.submitter) } uploadHandler() { if (this.files.length && !this.upload) { this.upload = this.uploadFiles() - this.form.pendingRquests = this.form?.pendingRquests || [] - this.form.pendingRquests.push(this.upload) + this.form.pendingRequests = this.form?.pendingRequests || [] + this.form.pendingRequests.push(this.upload) } } diff --git a/tests/__tests__/s3file.test.js b/tests/__tests__/s3file.test.js index d63d794..d94513e 100644 --- a/tests/__tests__/s3file.test.js +++ b/tests/__tests__/s3file.test.js @@ -55,7 +55,7 @@ describe("S3FileInput", () => { test("submitHandler", async () => { const form = document.createElement("form") document.body.appendChild(form) - form.pendingRquests = [] + form.pendingRequests = [] form.requestSubmit = mock.fn(form.requestSubmit) form.dispatchEvent = mock.fn(form.dispatchEvent) const submitButton = document.createElement("button") @@ -82,7 +82,7 @@ describe("S3FileInput", () => { input.uploadHandler() console.log(input.upload) assert(input.upload) - assert(form.pendingRquests) + assert(form.pendingRequests) }) test("fromDataHandler", () => {