@@ -194,7 +194,7 @@ function setLoadingState(event: Event) {
194
194
const state = states . get ( autoCheckElement )
195
195
196
196
// 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 ) {
198
198
return
199
199
}
200
200
@@ -244,7 +244,7 @@ async function check(autoCheckElement: AutoCheckElement) {
244
244
const state = states . get ( autoCheckElement )
245
245
246
246
// 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 ) {
248
248
if ( autoCheckElement . required ) {
249
249
input . setCustomValidity ( '' )
250
250
}
@@ -259,12 +259,12 @@ async function check(autoCheckElement: AutoCheckElement) {
259
259
}
260
260
261
261
const body = new FormData ( )
262
- if ( this . httpMethod ) {
262
+ if ( httpMethod === 'POST' ) {
263
263
body . append ( csrfField , csrf )
264
264
body . append ( 'value' , input . value )
265
265
} 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 ( )
268
268
}
269
269
270
270
input . dispatchEvent ( new AutoCheckSendEvent ( body ) )
0 commit comments