mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
Fix trying to update shapes for deleted tokens crash
This commit is contained in:
parent
feb438f882
commit
cc6f34f78a
1 changed files with 6 additions and 2 deletions
|
@ -55,8 +55,12 @@
|
|||
[xs resolved-tokens shape]
|
||||
(-> (reduce
|
||||
(fn [acc [k v]]
|
||||
(let [resolved-value (get-in resolved-tokens [v :resolved-value])]
|
||||
(if (and filter-existing-values? (= (get shape k) resolved-value))
|
||||
(let [resolved-token (get resolved-tokens v)
|
||||
resolved-value (get resolved-token :resolved-value)
|
||||
skip? (or
|
||||
(not (get resolved-tokens v))
|
||||
(and filter-existing-values? (= (get shape k) resolved-value)))]
|
||||
(if skip?
|
||||
acc
|
||||
(update acc resolved-value (fnil conj #{}) k))))
|
||||
{} xs)))
|
||||
|
|
Loading…
Add table
Reference in a new issue