@github/auto-check-element
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -66,4 +66,3 @@ function throttle(callback) { | ||
check: checker, | ||
controller: null, | ||
previousValue: null | ||
controller: null | ||
}; | ||
@@ -220,9 +219,2 @@ states.set(this, state); | ||
const body = new FormData(); | ||
body.append('authenticity_token', csrf); | ||
body.append('value', input.value); | ||
const id = body.entries ? [...body.entries()].sort().toString() : null; | ||
if (id && id === state.previousValue) return; | ||
state.previousValue = id; | ||
if (!input.value.trim()) { | ||
@@ -236,2 +228,5 @@ if (autoCheckElement.required) { | ||
const body = new FormData(); | ||
body.append('authenticity_token', csrf); | ||
body.append('value', input.value); | ||
input.dispatchEvent(new CustomEvent('auto-check-send', { | ||
@@ -238,0 +233,0 @@ bubbles: true, |
@@ -72,4 +72,3 @@ (function (global, factory) { | ||
check: checker, | ||
controller: null, | ||
previousValue: null | ||
controller: null | ||
}; | ||
@@ -226,9 +225,2 @@ states.set(this, state); | ||
const body = new FormData(); | ||
body.append('authenticity_token', csrf); | ||
body.append('value', input.value); | ||
const id = body.entries ? [...body.entries()].sort().toString() : null; | ||
if (id && id === state.previousValue) return; | ||
state.previousValue = id; | ||
if (!input.value.trim()) { | ||
@@ -242,2 +234,5 @@ if (autoCheckElement.required) { | ||
const body = new FormData(); | ||
body.append('authenticity_token', csrf); | ||
body.append('value', input.value); | ||
input.dispatchEvent(new CustomEvent('auto-check-send', { | ||
@@ -244,0 +239,0 @@ bubbles: true, |
{ | ||
"name": "@github/auto-check-element", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "An input element that validates its value with a server endpoint.", | ||
@@ -5,0 +5,0 @@ "repository": "github/auto-check-element", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2
23320
533