Fix parse errors with OFX data with no transactions (#2342)

* Fix parse errors with OFX data with no transactions

- Return an empty array instead of an array of undefined
This commit is contained in:
DJ Mountney
2024-02-08 13:15:21 -08:00
committed by GitHub
parent b1b266e83c
commit b994a6a74a
2 changed files with 7 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ function getInvStmtTrn(ofx) {
}
function getAsArray(value) {
return Array.isArray(value) ? value : [value];
return Array.isArray(value) ? value : value === undefined ? [] : [value];
}
function mapOfxTransaction(stmtTrn): OFXTransaction {

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [twk3]
---
Fix parse errors with OFX data with no transactions