Skip to content

Commit

Permalink
fix: helpers.save() is called with and without minify being set, make…
Browse files Browse the repository at this point in the history
… false by default. Fix call to xmlSave which does not accept a minify parameter. Fix return type of helpers.save()
  • Loading branch information
lucasnetau committed Sep 25, 2023
1 parent 843eca7 commit 41b10f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,15 @@ export default class Helpers {

/**
* Saves and returns formData
* @param {Boolean} minify whether to return formatted or minified data
* @return {XML|JSON} formData
* @param {boolean} [minify=false] whether to return formatted or minified data
* @return {string} formData FormData formatted in either XML or JSON depending on the current config.opts.dataType value
*/
save(minify) {
save(minify = false) {
const _this = this
const data = this.data
const stage = this.d.stage
const doSave = {
xml: minify => _this.xmlSave(stage, minify),
xml: () => _this.xmlSave(stage),
json: minify => window.JSON.stringify(_this.prepData(stage), null, minify && ' '),
}

Expand Down

0 comments on commit 41b10f0

Please sign in to comment.