fix: compare with zero

This commit is contained in:
Pavel Korytov 2024-11-22 17:59:48 +03:00
parent 89d93bd486
commit 27c54bfb78

View file

@ -717,11 +717,11 @@ TOTAL-TIME and PARENT-TIME are recursive parameters."
(dolist (node tree) (dolist (node tree)
(let ((total (float (alist-get :total (cdr node))))) (let ((total (float (alist-get :total (cdr node)))))
(setf (alist-get :parent-share (cdr node)) (setf (alist-get :parent-share (cdr node))
(if (> 0 parent-time) (if (< 0 parent-time)
(/ total (float parent-time)) (/ total (float parent-time))
0) 0)
(alist-get :total-share (cdr node)) (alist-get :total-share (cdr node))
(if (> 0 total-time) (if (< 0 total-time)
(/ total (float total-time)) (/ total (float total-time))
0)) 0))
(org-clock-agg--groupby-postaggregate (org-clock-agg--groupby-postaggregate