Skip to content

A local-first personal finance app

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

DJ Mountneyb994a6a74a4d
diff --git a/packages/loot-core/src/server/accounts/ofx2json.ts b/packages/loot-core/src/server/accounts/ofx2json.ts
index 2050936fba..91e1f50b4e 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 0000000000..abd5998924
--- /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