diff --git a/packages/loot-core/src/server/accounts/ofx2json.ts b/packages/loot-core/src/server/accounts/ofx2json.ts index 2050936fbae7ebcef41ca8cf2c980968f692f844..91e1f50b4e1682722d5a45f43265c07c8a2d7e83 100644 --- a/packages/loot-core/src/server/accounts/ofx2json.ts +++ b/packages/loot-core/src/server/accounts/ofx2json.ts @@ -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 { diff --git a/upcoming-release-notes/2342.md b/upcoming-release-notes/2342.md new file mode 100644 index 0000000000000000000000000000000000000000..abd5998924ac307c184ec220b95697074f484985 --- /dev/null +++ b/upcoming-release-notes/2342.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [twk3] +--- + +Fix parse errors with OFX data with no transactions