Don't modify internal API

This commit is contained in:
Adria Navarro 2023-09-29 14:58:02 +02:00
parent 5a3ecc3095
commit 9d186df018
1 changed files with 6 additions and 4 deletions

View File

@ -251,10 +251,12 @@ export async function outputProcessing<T extends Row[] | Row>(
)) as Row[]
}
// remove null properties to match internal API
for (let row of enriched) {
for (let key of Object.keys(row)) {
if (row[key] === null) {
delete row[key]
if (table.sourceId) {
for (let row of enriched) {
for (let key of Object.keys(row)) {
if (row[key] === null) {
delete row[key]
}
}
}
}