From 82ed8d99b0fd21319df494714c4aae0fa233e622 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 17 Dec 2024 15:34:05 +1100 Subject: [PATCH] Trim OFX1 field before import --- src/importers/ofx1.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/importers/ofx1.ts b/src/importers/ofx1.ts index 749c16d..3149104 100644 --- a/src/importers/ofx1.ts +++ b/src/importers/ofx1.ts @@ -73,8 +73,8 @@ function getNodeText(node: Node | null): string { } for (const child of node.childNodes) { - if (child.nodeType === Node.TEXT_NODE && child.nodeValue !== null && child.nodeValue.length > 0) { - return child.nodeValue; + if (child.nodeType === Node.TEXT_NODE && child.nodeValue !== null && child.nodeValue.trim().length > 0) { + return child.nodeValue.trim(); } if (child.nodeType === Node.ELEMENT_NODE) { break;