diff --git a/lib/new-admin/services/transactions.js b/lib/new-admin/services/transactions.js index 58983305..5ecf5c05 100644 --- a/lib/new-admin/services/transactions.js +++ b/lib/new-admin/services/transactions.js @@ -141,14 +141,14 @@ function batch ( return Promise.all(promises) .then(packager) - .then(res => { - if (simplified) return simplifiedBatch(res) + .then(res => + !isCsvExport ? res : // GQL transactions and transactionsCsv both use this function and // if we don't check for the correct simplified value, the Transactions page polling // will continuously build a csv in the background - else if (simplified === false) return advancedBatch(res) - return res - }) + simplified ? simplifiedBatch(res) : + advancedBatch(res) + ) } function advancedBatch (data) {