From a8f6b096e1f4d4ca7be01bf4cfc51397b1aca870 Mon Sep 17 00:00:00 2001 From: Simon Taranto Date: Fri, 24 May 2024 14:33:38 -0400 Subject: [PATCH] Update src/auto-check-element.ts --- src/auto-check-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auto-check-element.ts b/src/auto-check-element.ts index 08166fb..fa659da 100644 --- a/src/auto-check-element.ts +++ b/src/auto-check-element.ts @@ -244,7 +244,7 @@ async function check(autoCheckElement: AutoCheckElement) { const state = states.get(autoCheckElement) // If some attributes are missing we want to exit early and make sure that the element is valid. - if (!src || (httpMethod && !csrf) || !state) { + if (!src || (httpMethod === 'POST' && !csrf) || !state) { if (autoCheckElement.required) { input.setCustomValidity('') }