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,6 +251,7 @@ export async function outputProcessing<T extends Row[] | Row>(
)) as Row[]
}
// remove null properties to match internal API
if (table.sourceId) {
for (let row of enriched) {
for (let key of Object.keys(row)) {
if (row[key] === null) {
@ -258,6 +259,7 @@ export async function outputProcessing<T extends Row[] | Row>(
}
}
}
}
return (wasArray ? enriched : enriched[0]) as T
}