summaryrefslogtreecommitdiff
path: root/src/chef/logic/categories.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-06-21 12:16:50 +0200
committerTim <contact@bytim.eu>2025-06-21 12:16:50 +0200
commit52591459a20119ff844b4be4a5604096a066f4fd (patch)
treee1d5fea54e398d489b7ac081e015589584fa9fd1 /src/chef/logic/categories.clj
parent0fef05a6e926b5dc5db79cc0e86fd189ad166b33 (diff)
downloadchef-52591459a20119ff844b4be4a5604096a066f4fd.tar.xz
chef-52591459a20119ff844b4be4a5604096a066f4fd.zip
Fix infinite loading loop
Diffstat (limited to 'src/chef/logic/categories.clj')
-rw-r--r--src/chef/logic/categories.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chef/logic/categories.clj b/src/chef/logic/categories.clj
index cadcc5a..126cdfd 100644
--- a/src/chef/logic/categories.clj
+++ b/src/chef/logic/categories.clj
@@ -70,7 +70,8 @@
(loop [parents (list)
category category]
(let [updated-parents (conj parents category)]
- (if (not= -1 (:categories/parent category))
+ (if (and (some? (:categories/parent category))
+ (not= -1 (:categories/parent category)))
(recur updated-parents
(get-category (:categories/parent category)))
updated-parents))))