A local-first personal finance app
Prevent account fallback if name is defined in formatPayeeName (#429)
Rubén Martínez Hostyn446f40714d8d
diff --git a/src/util/payee-name.js b/src/util/payee-name.jsindex 2a50e37b0b..1967aa4950 100644--- a/src/util/payee-name.js+++ b/src/util/payee-name.js@@ -21,6 +21,10 @@ export const formatPayeeName = (trans) => {// use the correct name field if it was found// if not, use whatever we can find++ // if the primary name option is set, prevent the account from falling back+ account = name ? account : trans.debtorAccount || trans.creditorAccount;+name =name ||trans.debtorName ||@@ -29,8 +33,6 @@ export const formatPayeeName = (trans) => {(trans.remittanceInformationUnstructuredArray || []).join(', ') ||trans.additionalInformation;- account = account || trans.debtorAccount || trans.creditorAccount;-if (name) {nameParts.push(title(name));}diff --git a/upcoming-release-notes/429.md b/upcoming-release-notes/429.mdnew file mode 100644index 0000000000..7aa856aff9--- /dev/null+++ b/upcoming-release-notes/429.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [hostyn]+---++Prevent account fallback if name is defined in formatPayeeName