element-internals-polyfill
Advanced tools
Comparing version 0.1.40 to 0.1.41
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.41](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.40...v0.1.41) (2021-07-25) | ||
### Bug Fixes | ||
* ensure form has elements before trying to process data ([65a51a2](https://github.com/calebdwilliams/element-internals-polyfill/commit/65a51a2230d2c22cb7970134da2eca35ae8b60d0)) | ||
### [0.1.40](https://github.com/calebdwilliams/element-internals-polyfill/compare/v0.1.39...v0.1.40) (2021-06-28) | ||
@@ -7,0 +14,0 @@ |
@@ -93,7 +93,9 @@ (function () { | ||
const elements = formElementsMap.get(event.target); | ||
elements.forEach(element => { | ||
if (element.constructor.formAssociated && element.formResetCallback) { | ||
element.formResetCallback.apply(element); | ||
} | ||
}); | ||
if (elements && elements.size) { | ||
elements.forEach(element => { | ||
if (element.constructor.formAssociated && element.formResetCallback) { | ||
element.formResetCallback.apply(element); | ||
} | ||
}); | ||
} | ||
}; | ||
@@ -138,9 +140,11 @@ const initForm = (ref, form, internals) => { | ||
const elements = formElementsMap.get(form); | ||
elements.forEach(element => { | ||
const internals = internalsMap.get(element); | ||
const valid = internals[method](); | ||
if (!valid) { | ||
returnValue = false; | ||
} | ||
}); | ||
if (elements && elements.size) { | ||
elements.forEach(element => { | ||
const internals = internalsMap.get(element); | ||
const valid = internals[method](); | ||
if (!valid) { | ||
returnValue = false; | ||
} | ||
}); | ||
} | ||
return returnValue; | ||
@@ -147,0 +151,0 @@ }; |
{ | ||
"name": "element-internals-polyfill", | ||
"version": "0.1.40", | ||
"version": "0.1.41", | ||
"description": "A polyfill for the element internals specification", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63535
865