Skip to content

Commit

Permalink
fixed bug with option skipEmpty in select fields (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
brainfoolong committed Dec 2, 2022
1 parent 5b3069e commit b270388
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 371 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.1.4 - 2022-12-02

* fixed bug with option `skipEmpty` in select fields (https://github.com/brainfoolong/form-data-json/issues/31)

### 2.1.2 and 2.1.3 - 2022-02-09

* fixed issue with skipEmpty and nested input value #25
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ You can edit this defaults globally by modifying `FormDataJson.defaultOptionsToJ
* If true, then this does skip empty fields from the output
* Empty is considered to be:
* An empty array (for multiple selects/checkboxes)
* An empty input field (length = 0)
* An empty input field (length = 0 or null)
* This does recursively remove keys
* Example: {"agb":"1", "user" : [{"name" : ""},{"name" : ""}]} will be {"agb":"1"}
* @type {boolean}
Expand Down
2 changes: 1 addition & 1 deletion build/dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function compile () {
for (let file in babelConfigs) {
let contents = ''
contents += babel.transformSync(srcFileData, babelConfigs[file]).code
contents = contents.replace(/^\'use strict\';/mg, '\'use strict\';\n// ' + packageJson.name + ' | version: ' + packageJson.version + ' | url: ' + packageJson.homepage + '\n')
contents = contents.replace(/^["']use strict["'];/mg, '\'use strict\';\n// ' + packageJson.name + ' | version: ' + packageJson.version + ' | url: ' + packageJson.homepage + '\n')
fs.writeFileSync(copyToFolder + '/' + file, contents)
}
}
Expand Down
Loading

0 comments on commit b270388

Please sign in to comment.