Browse Source

[ledger] fix non-existing account editior

Innocenty Enikeew 8 năm trước cách đây
mục cha
commit
0554bbf3e1
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      plugins/ledger.lisp

+ 2 - 2
plugins/ledger.lisp

@@ -373,8 +373,8 @@
                                 :test #'equal) #'string<))
                (total (length children)))
           (when (stringp offset)
-            (alexandria:when-let (off (position offset children :test #'equal))
-              (setf offset (max 0 (- off (round count 2))))))
+            (let ((off (position offset children :test #'equal)))
+              (setf offset (if off (max 0 (- off (round count 2))) 0))))
           (values account parent
                   (mapcar
                    #'(lambda (c)