@contentful/field-editor-rich-text 1.0.4 → 1.0.8

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.
@@ -2768,19 +2768,13 @@ function _fetchAllData() {
2768
2768
  case 4:
2769
2769
  entity = _context.sent;
2770
2770
 
2771
- if (!entity.sys.contentType) {
2772
- _context.next = 10;
2773
- break;
2771
+ if (entity.sys.contentType) {
2772
+ contentTypeId = entity.sys.contentType.sys.id;
2773
+ contentType = sdk.space.getCachedContentTypes().find(function (ct) {
2774
+ return ct.sys.id === contentTypeId;
2775
+ });
2774
2776
  }
2775
2777
 
2776
- contentTypeId = entity.sys.contentType.sys.id;
2777
- _context.next = 9;
2778
- return sdk.space.getContentType(contentTypeId);
2779
-
2780
- case 9:
2781
- contentType = _context.sent;
2782
-
2783
- case 10:
2784
2778
  entityTitle = entityType === 'Entry' ? entityHelpers.getEntryTitle({
2785
2779
  entry: entity,
2786
2780
  contentType: contentType,
@@ -2799,10 +2793,10 @@ function _fetchAllData() {
2799
2793
  localeCode: localeCode,
2800
2794
  defaultLocaleCode: defaultLocaleCode
2801
2795
  });
2802
- _context.next = 14;
2796
+ _context.next = 10;
2803
2797
  return sdk.space.getEntityScheduledActions(entityType, entityId);
2804
2798
 
2805
- case 14:
2799
+ case 10:
2806
2800
  jobs = _context.sent;
2807
2801
  entityStatus = entityHelpers.getEntryStatus(entity.sys);
2808
2802
  return _context.abrupt("return", {
@@ -2814,7 +2808,7 @@ function _fetchAllData() {
2814
2808
  contentTypeName: contentType ? contentType.name : ''
2815
2809
  });
2816
2810
 
2817
- case 17:
2811
+ case 13:
2818
2812
  case "end":
2819
2813
  return _context.stop();
2820
2814
  }