summaryrefslogtreecommitdiff
path: root/static/js/controllers/base_controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/controllers/base_controller.js')
-rw-r--r--static/js/controllers/base_controller.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/static/js/controllers/base_controller.js b/static/js/controllers/base_controller.js
index 6caa9dd..2ef359c 100644
--- a/static/js/controllers/base_controller.js
+++ b/static/js/controllers/base_controller.js
@@ -9,9 +9,8 @@ export class BaseController {
this.parser = new DOMParser();
}
- async submit(event, route) {
+ async submit(event, route, form = new FormData(event.target)) {
event.preventDefault();
- const form = new FormData(event.target);
try {
const response = await fetch(route, { method: "POST", body: form });