mirror of
https://github.com/penpot/penpot.git
synced 2026-07-22 22:17:58 +00:00
🐛 Fix problems with repair and validation
This commit is contained in:
parent
c43a0160c1
commit
3340471d23
@ -644,9 +644,11 @@
|
||||
(fn [shape]
|
||||
;; Set the desired swap slot
|
||||
(let [slot (:swap-slot args)]
|
||||
(when (some? slot)
|
||||
(log/debug :hint (str " -> set swap-slot to " slot))
|
||||
(ctk/set-swap-slot shape slot))))]
|
||||
(if (some? slot)
|
||||
(do
|
||||
(log/debug :hint (str " -> set swap-slot to " slot))
|
||||
(ctk/set-swap-slot shape slot))
|
||||
shape)))]
|
||||
|
||||
(log/dbg :hint "repairing shape :missing-slot" :id (:id shape) :name (:name shape) :page-id page-id)
|
||||
(-> (pcb/empty-changes nil page-id)
|
||||
|
||||
@ -704,7 +704,8 @@
|
||||
|
||||
(defn- get-orphan-shapes
|
||||
[{:keys [objects] :as page}]
|
||||
(let [xf (comp (map #(contains? objects (:parent-id %)))
|
||||
(let [xf (comp (filter #(and (some? (:parent-id %))
|
||||
(not (contains? objects (:parent-id %)))))
|
||||
(map :id))]
|
||||
(into [] xf (vals objects))))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user