Trim OFX1 field before import

This commit is contained in:
RunasSudo 2024-12-17 15:34:05 +11:00
parent 2959b2bbaa
commit 82ed8d99b0
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -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;