Skip to content

Commit a8f6b09

Browse files
authored
Update src/auto-check-element.ts
1 parent 6cde2e8 commit a8f6b09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auto-check-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ async function check(autoCheckElement: AutoCheckElement) {
244244
const state = states.get(autoCheckElement)
245245

246246
// If some attributes are missing we want to exit early and make sure that the element is valid.
247-
if (!src || (httpMethod && !csrf) || !state) {
247+
if (!src || (httpMethod === 'POST' && !csrf) || !state) {
248248
if (autoCheckElement.required) {
249249
input.setCustomValidity('')
250250
}

0 commit comments

Comments
 (0)