@legalplace/prerenderx 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -64,12 +64,3 @@ const pdfFormsDocuments = documentsIndex.filter((documentDescription) => Prerend
64
64
  // Extracting outputs documents only
65
65
  const outputDocuments = documentsIndex.filter((documentDescription) => Prerender.isOutput(documentDescription))
66
66
  ```
67
-
68
- Variable `documents` will now contain an object containing all documents and their respective outputs
69
- ```
70
- {
71
- 'main': [..., 'some output', ...],
72
- 'some secondary document': [..., 'some other output', ...]
73
- ...
74
- }
75
- ```
@@ -41,7 +41,9 @@ var FillPdfForm = (function (_super) {
41
41
  });
42
42
  form.boxes.forEach(function (box) {
43
43
  var id = "Page" + box.page + "[0]." + box.name;
44
- result.boxes[id] = _this.getBoxValue(box);
44
+ var value = _this.getBoxValue(box);
45
+ if (!(value === '' && Object.prototype.hasOwnProperty.call(result.boxes, id)))
46
+ result.boxes[id] = value;
45
47
  });
46
48
  return result;
47
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/prerenderx",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "PrerenderX",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://git.legalplace.eu/legalplace/prerenderx",
@@ -31,7 +31,8 @@ class FillPdfForm extends FillPdfFormBase {
31
31
  // Filling boxes
32
32
  form.boxes.forEach(box => {
33
33
  const id = `Page${box.page}[0].${box.name}`
34
- result.boxes[id] = this.getBoxValue(box)
34
+ const value = this.getBoxValue(box)
35
+ if (!(value === '' && Object.prototype.hasOwnProperty.call(result.boxes, id))) result.boxes[id] = value
35
36
  })
36
37
 
37
38
  return result