Skip to content

A local-first personal finance app

:bug: (import) fix qfx import crash if input is malformed file (#3541)

Matiss Janis Aboltins327887b87d63
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx b/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
index 3d0d5dca5e..4a74a10b70 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx
@@ -1021,7 +1021,7 @@ export function ImportTransactionsModal({ options }) {
setFilename(filename);
setFileType(filetype);
- const { errors, transactions: parsedTransactions } =
+ const { errors, transactions: parsedTransactions = [] } =
await parseTransactions(filename, options);
let index = 0;
diff --git a/upcoming-release-notes/3541.md b/upcoming-release-notes/3541.md
new file mode 100644
index 0000000000..bd1a1ea86e
--- /dev/null
+++ b/upcoming-release-notes/3541.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+Fix import crashing if the QFX file is malformed.