fix: handle missing inferred title field (#3239)
This commit is contained in:
parent
3678053f0c
commit
ca8cf71ab0
@ -129,7 +129,9 @@ const mapStateToProps = (state, ownProps) => {
|
|||||||
const { entry, inferedFields, collection } = ownProps;
|
const { entry, inferedFields, collection } = ownProps;
|
||||||
const label = entry.get('label');
|
const label = entry.get('label');
|
||||||
const entryData = entry.get('data');
|
const entryData = entry.get('data');
|
||||||
const defaultTitle = label || entryData.getIn(keyToPathArray(inferedFields.titleField));
|
const defaultTitle =
|
||||||
|
label ||
|
||||||
|
(inferedFields.titleField && entryData.getIn(keyToPathArray(inferedFields.titleField)));
|
||||||
const summaryTemplate = collection.get('summary');
|
const summaryTemplate = collection.get('summary');
|
||||||
const summary = summaryTemplate
|
const summary = summaryTemplate
|
||||||
? summaryFormatter(summaryTemplate, entry, collection)
|
? summaryFormatter(summaryTemplate, entry, collection)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user