Filtering falsey values from summary template to prevent empty wraps.
This commit is contained in:
parent
e8f36ad9e4
commit
8f9baf6bc5
2
static
2
static
|
@ -1 +1 @@
|
|||
Subproject commit ee6b2e5a5b28a5a0378307a2f3cb8896cf11e12b
|
||||
Subproject commit aeef9c536d4b821f0d20260624e7024060f2f2b0
|
|
@ -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 || ''))
|
||||
|
|
Loading…
Reference in New Issue