@aemforms/af-core 0.22.38 → 0.22.39

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/lib/FileUpload.js CHANGED
@@ -17,6 +17,7 @@ const Field_1 = __importDefault(require("./Field"));
17
17
  const FormUtils_1 = require("./utils/FormUtils");
18
18
  const FileObject_1 = require("./FileObject");
19
19
  const ValidationUtils_1 = require("./utils/ValidationUtils");
20
+ const EmptyDataValue_1 = __importDefault(require("./data/EmptyDataValue"));
20
21
  function addNameToDataURL(dataURL, name) {
21
22
  return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);
22
23
  }
@@ -105,7 +106,7 @@ class FileUpload extends Field_1.default {
105
106
  importData(dataModel) {
106
107
  this._bindToDataModel(dataModel);
107
108
  const dataNode = this.getDataNode();
108
- if (dataNode !== undefined) {
109
+ if (dataNode !== undefined && dataNode !== EmptyDataValue_1.default) {
109
110
  const value = dataNode === null || dataNode === void 0 ? void 0 : dataNode.$value;
110
111
  if (value != null) {
111
112
  const res = ValidationUtils_1.Constraints.type(this.getInternalType(), value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aemforms/af-core",
3
- "version": "0.22.38",
3
+ "version": "0.22.39",
4
4
  "description": "Core Module for Forms Runtime",
5
5
  "author": "Adobe Systems",
6
6
  "license": "Adobe Proprietary",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@adobe/json-formula": "0.1.50",
38
- "@aemforms/af-formatters": "^0.22.38"
38
+ "@aemforms/af-formatters": "^0.22.39"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/preset-env": "^7.20.2",