@contentful/field-editor-reference 6.15.0 → 6.15.1

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.
@@ -97,7 +97,7 @@ function FetchingWrappedEntryCard(props) {
97
97
  bulkEditing: props.parameters.instance.bulkEditing,
98
98
  index: props.index
99
99
  });
100
- props.onAction && props.onAction({
100
+ props.onAction?.({
101
101
  entity: 'Entry',
102
102
  type: 'edit',
103
103
  id: props.entryId,
@@ -107,16 +107,16 @@ function FetchingWrappedEntryCard(props) {
107
107
  };
108
108
  const onRemoveEntry = ()=>{
109
109
  props.onRemove();
110
- props.onAction && props.onAction({
110
+ props.onAction?.({
111
111
  entity: 'Entry',
112
112
  type: 'delete',
113
113
  id: props.entryId,
114
- contentTypeId: entry.sys.contentType.sys.id
114
+ contentTypeId: entry?.sys?.contentType?.sys?.id ?? ''
115
115
  });
116
116
  };
117
117
  _react.useEffect(()=>{
118
118
  if (entry) {
119
- props.onAction && props.onAction({
119
+ props.onAction?.({
120
120
  type: 'rendered',
121
121
  entity: 'Entry'
122
122
  });
@@ -46,7 +46,7 @@ export function FetchingWrappedEntryCard(props) {
46
46
  bulkEditing: props.parameters.instance.bulkEditing,
47
47
  index: props.index
48
48
  });
49
- props.onAction && props.onAction({
49
+ props.onAction?.({
50
50
  entity: 'Entry',
51
51
  type: 'edit',
52
52
  id: props.entryId,
@@ -56,16 +56,16 @@ export function FetchingWrappedEntryCard(props) {
56
56
  };
57
57
  const onRemoveEntry = ()=>{
58
58
  props.onRemove();
59
- props.onAction && props.onAction({
59
+ props.onAction?.({
60
60
  entity: 'Entry',
61
61
  type: 'delete',
62
62
  id: props.entryId,
63
- contentTypeId: entry.sys.contentType.sys.id
63
+ contentTypeId: entry?.sys?.contentType?.sys?.id ?? ''
64
64
  });
65
65
  };
66
66
  React.useEffect(()=>{
67
67
  if (entry) {
68
- props.onAction && props.onAction({
68
+ props.onAction?.({
69
69
  type: 'rendered',
70
70
  entity: 'Entry'
71
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-reference",
3
- "version": "6.15.0",
3
+ "version": "6.15.1",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "registry": "https://npm.pkg.github.com/"
70
70
  },
71
- "gitHead": "e685baec786ae9c9a6e0660bdb17005304646593"
71
+ "gitHead": "c29a501efe92281b4a990adc129b78270ce1acff"
72
72
  }