0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 11:59:17 -05:00

Ensure vector

This commit is contained in:
Florian Schroedl 2024-08-13 14:41:18 +02:00
parent bcd4b6d9ec
commit ec01ce7550

View file

@ -23,7 +23,7 @@
(let [exists? (some (partial = id) token-set-groups)] (let [exists? (some (partial = id) token-set-groups)]
(cond (cond
exists? token-set-groups exists? token-set-groups
(nil? index) (conj token-set-groups id) (nil? index) (conj (or token-set-groups []) id)
:else (d/insert-at-index token-set-groups index [id]))))) :else (d/insert-at-index token-set-groups index [id])))))
(update :token-sets-index assoc id token-set))) (update :token-sets-index assoc id token-set)))