From 71c7f9fb117c66c6811d3ef1b6f86e59f5730eea Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Thu, 7 Mar 2024 08:23:27 +0100 Subject: [PATCH] FIX BackgroundSync SC --- assets/src/backgroundsync-form_controller.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/assets/src/backgroundsync-form_controller.js b/assets/src/backgroundsync-form_controller.js index aaae0d8..a0dc7c7 100644 --- a/assets/src/backgroundsync-form_controller.js +++ b/assets/src/backgroundsync-form_controller.js @@ -20,10 +20,8 @@ export default class extends Controller { event.preventDefault(); const form = this.element; if (!form instanceof HTMLFormElement || !form.checkValidity()) { - console.error('Form is not valid', form, form.checkValidity()); return; } - console.error(form.method); const url = form.action; try { @@ -34,10 +32,8 @@ export default class extends Controller { params.method = form.method.toUpperCase(); await fetch(url, params); } catch (error) { - console.error('Error while sending form', error); // No need to do anything here } finally { - console.log('finally', this.redirectionValue); window.location.href = this.redirectionValue || url; } }