0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed tests for demo-data

no issue
This commit is contained in:
Sam Lord 2023-02-17 15:08:01 +00:00
parent ca395a958c
commit 10a4a8eb12

View file

@ -32,13 +32,13 @@ class EmailRecipientsImporter extends TableImporter {
.filter(entry => entry.newsletter_id === this.model.newsletter_id)
.filter(entry => new Date(entry.created_at) < earliestOpenTime)
.map(memberSubscribeEvent => memberSubscribeEvent.member_id);
this.events = generateEvents({
this.events = this.membersList.length > 0 ? generateEvents({
shape: 'ease-out',
trend: 'negative',
total: this.membersList.length,
startTime: earliestOpenTime,
endTime: currentTime < latestOpenTime ? currentTime : latestOpenTime
});
}) : [];
this.emailMeta = {
emailCount: this.model.email_count,
deliveredCount: this.model.delivered_count,