branch: elpa/csv2ledger
commit ac7abd896f3923a24b5a27915492b81bf90640d3
Author: Joost Kremers <joostkrem...@fastmail.fm>
Commit: Joost Kremers <joostkrem...@fastmail.fm>

    Guard against empty value of counterpart.
---
 csv2ledger.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/csv2ledger.el b/csv2ledger.el
index 1dd62dd667..5e8a659dad 100644
--- a/csv2ledger.el
+++ b/csv2ledger.el
@@ -260,7 +260,10 @@ TRANSACTION should be an alist containing field-value 
pairs and
 should contain a value for `counterpart', which is the return
 value.  If `counterpart' does not have a value, this function
 returns \"Unknown\"."
-  (alist-get 'counterpart transaction "Unknown"))
+  (let ((title (alist-get 'counterpart transaction "")))
+    (if (string-empty-p title)
+        "Unknown payee"
+      title)))
 
 (defun c2l-amount-is-amount (transaction)
   "Return the amount of an entry.

Reply via email to