refactor: simplified CSV testing

This commit is contained in:
André Sá 2022-08-02 15:50:48 +01:00 committed by Rafael
parent 4dc4d14742
commit eed09b52ca

View file

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