@joinbox/formsync
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.1.1](https://github.com/joinbox/ui-components/compare/@joinbox/formsync@2.1.0...@joinbox/formsync@2.1.1) (2021-07-06) | ||
### Bug Fixes | ||
* **formsync:** don't copy attributes if missing on source ([99ac7ce](https://github.com/joinbox/ui-components/commit/99ac7ce0caa70095ffcfd591c30be3221e339d7f)) | ||
# [2.1.0](https://github.com/joinbox/ui-components/compare/@joinbox/formsync@2.0.3...@joinbox/formsync@2.1.0) (2021-07-06) | ||
@@ -8,0 +19,0 @@ |
@@ -198,2 +198,10 @@ (function () { | ||
// Make sure we don't copy attributes that are non-existent on source; for boolean attributes | ||
// (e.g. disabled) this would lead to the attribute being added to target | ||
// (as e.g. disabled="null") while it is not present on the source | ||
// At the same time, we will not remove attributes on target if missing on source, as a | ||
// developer might e.g. want to add certain classes on target while there's no need for a | ||
// class attribute on the source. | ||
if (!sourceElement.hasAttribute(attribute)) return; | ||
targetElement.setAttribute( | ||
@@ -200,0 +208,0 @@ attribute, |
{ | ||
"name": "@joinbox/formsync", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Synchronizes forms and elements between an original form (e.g. one created by Drupal) and another form (e.g. freely created as a template based on mockups).", | ||
@@ -32,3 +32,3 @@ "main": "FormSync.js", | ||
}, | ||
"gitHead": "2208424f02df4d9f1b0192d5c5b10e513cc79da8" | ||
"gitHead": "77a4c145bfda19c9f16237429421cea457fba430" | ||
} |
@@ -19,2 +19,10 @@ /** | ||
// Make sure we don't copy attributes that are non-existent on source; for boolean attributes | ||
// (e.g. disabled) this would lead to the attribute being added to target | ||
// (as e.g. disabled="null") while it is not present on the source | ||
// At the same time, we will not remove attributes on target if missing on source, as a | ||
// developer might e.g. want to add certain classes on target while there's no need for a | ||
// class attribute on the source. | ||
if (!sourceElement.hasAttribute(attribute)) return; | ||
targetElement.setAttribute( | ||
@@ -21,0 +29,0 @@ attribute, |
Sorry, the diff of this file is not supported yet
85575
1659