Skip to content

Commit 6cde2e8

Browse files
authored
linting
1 parent 1ba5238 commit 6cde2e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/auto-check-element.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function setLoadingState(event: Event) {
194194
const state = states.get(autoCheckElement)
195195

196196
// If some attributes are missing we want to exit early and make sure that the element is valid.
197-
if (!src || (this.httpMethod == 'POST' && !csrf) || !state) {
197+
if (!src || (httpMethod === 'POST' && !csrf) || !state) {
198198
return
199199
}
200200

@@ -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 || (this.httpMethod && !csrf) || !state) {
247+
if (!src || (httpMethod && !csrf) || !state) {
248248
if (autoCheckElement.required) {
249249
input.setCustomValidity('')
250250
}
@@ -259,12 +259,12 @@ async function check(autoCheckElement: AutoCheckElement) {
259259
}
260260

261261
const body = new FormData()
262-
if (this.httpMethod) {
262+
if (httpMethod === 'POST') {
263263
body.append(csrfField, csrf)
264264
body.append('value', input.value)
265265
} else {
266-
url = new URL(src, window.location.origin);
267-
url.search = new URLSearchParams({ value: input.value }).toString();
266+
url = new URL(src, window.location.origin)
267+
url.search = new URLSearchParams({value: input.value}).toString()
268268
}
269269

270270
input.dispatchEvent(new AutoCheckSendEvent(body))

0 commit comments

Comments
 (0)