@griddo/ax 1.65.4 → 1.65.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "1.65.4",
4
+ "version": "1.65.7",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Carlos Torres <carlos.torres@secuoyas.com>",
@@ -220,5 +220,5 @@
220
220
  "publishConfig": {
221
221
  "access": "public"
222
222
  },
223
- "gitHead": "46c0e9c2f417b9fe3814e374b1df32d32e5e93b2"
223
+ "gitHead": "0a597a28c5b2755b0b15eb3cea063731e42b587e"
224
224
  }
@@ -151,9 +151,11 @@ const isEmptyField = (value: any, fieldType: string, multiple: boolean) => {
151
151
  case "ArrayFieldGroup":
152
152
  return !value || !value.length;
153
153
  case "ReferenceField":
154
- return value.fixed && !value.fixed.length;
155
- case "ComponentContainer":
156
- return isEmptyContainer(value, multiple);
154
+ return !value || (value.fixed && !value.fixed.length);
155
+ case "ComponentContainer": {
156
+ const { isEmpty } = isEmptyContainer(value, multiple);
157
+ return isEmpty;
158
+ }
157
159
  default:
158
160
  return typeof value === "string" && value.trim().length === 0;
159
161
  }
@@ -228,16 +230,17 @@ const findFieldsErrors = (content: any): IErrorItem[] => {
228
230
  if (currentObj.component && !isComponentEmpty(currentObj)) {
229
231
  let schemaErrors: any[] = [];
230
232
  const schema: any = getSchema(currentObj.component);
231
- schema.configTabs.forEach((tab: any) => {
232
- const valErrors: IErrorItem[] = getValidationErrors(
233
- tab.fields,
234
- currentObj,
235
- schema.displayName,
236
- tab.title,
237
- false
238
- );
239
- schemaErrors = [...schemaErrors, ...valErrors];
240
- });
233
+ schema &&
234
+ schema.configTabs.forEach((tab: any) => {
235
+ const valErrors: IErrorItem[] = getValidationErrors(
236
+ tab.fields,
237
+ currentObj,
238
+ schema.displayName,
239
+ tab.title,
240
+ false
241
+ );
242
+ schemaErrors = [...schemaErrors, ...valErrors];
243
+ });
241
244
  errors = [...errors, ...schemaErrors];
242
245
  }
243
246