ywana-core8 0.0.448 → 0.0.451

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.
@@ -1346,7 +1346,8 @@ var ContentType = /*#__PURE__*/function () {
1346
1346
  break;
1347
1347
 
1348
1348
  case TYPES.ENTITY:
1349
- if (optional === true && entryData === null) break;
1349
+ if (optional === true) console.log('OPTIONAL', field, !entryData);
1350
+ if (optional === true && !entryData) break;
1350
1351
  var child1 = new ContentType(item);
1351
1352
  next[name] = child1.value(entryData);
1352
1353
  break;
@@ -5240,8 +5241,11 @@ var FieldViewer = function FieldViewer(props) {
5240
5241
  item = field.item,
5241
5242
  label = field.label,
5242
5243
  _field$visible = field.visible,
5243
- visible = _field$visible === void 0 ? true : _field$visible;
5244
+ visible = _field$visible === void 0 ? true : _field$visible,
5245
+ optional = field.optional;
5244
5246
  if (!visible) return null;
5247
+ console.log("FieldViewer Optional", field, optional && value === null);
5248
+ if (optional && value === null) return null;
5245
5249
 
5246
5250
  switch (type) {
5247
5251
  case TYPES.STRING: