oneentry 1.0.148 → 1.0.149

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.
@@ -65,14 +65,14 @@ class FormsDataApi extends asyncModules_1.default {
65
65
  */
66
66
  async postFormsData(body, langCode = this.state.lang) {
67
67
  const formData = {};
68
- // filter spam and button fields, send file
68
+ // filter button fields; keep spam fields so the captcha token in their `value` reaches the server
69
69
  formData[langCode] = Array.isArray(body.formData)
70
- ? body.formData.filter((fd) => fd.type !== 'spam' && fd.type !== 'button')
71
- : [body.formData].filter((fd) => fd.type !== 'spam' && fd.type !== 'button');
70
+ ? body.formData.filter((fd) => fd.type !== 'button')
71
+ : [body.formData].filter((fd) => fd.type !== 'button');
72
72
  /**
73
73
  * Handle file uploads if fileQuery is present
74
+ * Check if there is any element in formData[langCode] that contains one of the specified types
74
75
  */
75
- // Check if there is any element in formData[langCode] that contains one of the specified types
76
76
  if (formData[langCode].find((fd) => ['file', 'image', 'groupOfImages'].includes(fd.type))) {
77
77
  // Create an instance of FileUploadingApi with the current state
78
78
  const fileUploader = new fileUploadingApi_1.default(this.state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.148",
3
+ "version": "1.0.149",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",