Filtering falsey values from summary template to prevent empty wraps.
This commit is contained in:
@@ -51,12 +51,13 @@ const propProcessors = {
|
||||
return format(sceneInfo.effectiveDate, dateFormat);
|
||||
}
|
||||
|
||||
return '';
|
||||
return null;
|
||||
},
|
||||
};
|
||||
|
||||
function curateValue(value, item) {
|
||||
return [].concat(value) // account for both arrays (actors, tags) and strings (title, channel)
|
||||
.filter((listValue) => !!listValue)
|
||||
.slice(0, item.limit || Infinity)
|
||||
.map((listValue) => (item.slugify ? slugify(listValue, item.slugify) : listValue))
|
||||
.map((listValue) => ellipsis(listValue, item.slice || Infinity, item.ellipsis || ''))
|
||||
|
||||
Reference in New Issue
Block a user