0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Reverted a bad change from a previous commit

commit b94c8bcfd4
This commit is contained in:
Thibaut Patel 2021-07-01 16:39:29 +02:00
parent 6f1a3e1774
commit 2d95c1b8d7

View file

@ -367,7 +367,7 @@ async function getEmailMemberRows({emailModel, memberSegment, options}) {
*/ */
async function createSegmentedEmailBatches({emailModel, options}) { async function createSegmentedEmailBatches({emailModel, options}) {
const segments = getSegmentsFromHtml(emailModel.get('html')); const segments = getSegmentsFromHtml(emailModel.get('html'));
let batchIds = []; const batchIds = [];
if (segments.length) { if (segments.length) {
for (const memberSegment of segments) { for (const memberSegment of segments) {
@ -376,11 +376,11 @@ async function createSegmentedEmailBatches({emailModel, options}) {
memberSegment, memberSegment,
options options
}); });
batchIds = emailBatchIds; batchIds.push(emailBatchIds);
} }
} else { } else {
const emailBatchIds = await createEmailBatches({emailModel, options}); const emailBatchIds = await createEmailBatches({emailModel, options});
batchIds = emailBatchIds; batchIds.push(emailBatchIds);
} }
return batchIds; return batchIds;