Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
makeItem(item, itemIndex) {
if (fixtures.articleListNoImages[itemIndex]) {
return {
...fixtures.articleListNoImages[itemIndex],
summary(__, { maxCharCount }) {
if (maxCharCount === 360) {
return fixtures.articleListNoImages[itemIndex]
.longSummary;
}
return fixtures.articleListNoImages[itemIndex].shortSummary;
}
};
}
return item;
},
pageSize,
summary(__, { maxCharCount }) {
if (maxCharCount === 360) {
return fixtures.articleListNoImages[itemIndex]
.longSummary;
}
return fixtures.articleListNoImages[itemIndex].shortSummary;
}
};