mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 22:53:02 +00:00
@@ -474,7 +474,14 @@
|
||||
[{:keys [data features] :as file} libraries]
|
||||
(when (contains? features "components/v2")
|
||||
(doseq [page (filter :id (ctpl/pages-seq data))]
|
||||
(validate-shape! uuid/zero file page libraries))
|
||||
(let [orphans (->> page
|
||||
:objects
|
||||
vals
|
||||
(filter #(not (contains? (:objects page) (:parent-id %))))
|
||||
(map :id))]
|
||||
(validate-shape! uuid/zero file page libraries)
|
||||
(doseq [shape-id orphans]
|
||||
(validate-shape! shape-id file page libraries))))
|
||||
|
||||
(doseq [component (vals (:components data))]
|
||||
(validate-component! component file)))
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
shape (first shapes)
|
||||
id (:id shape)
|
||||
shape-name (:name shape)
|
||||
component (ctf/resolve-component shape {:id current-file-id :data workspace-data} workspace-libraries)
|
||||
component (ctf/resolve-component shape {:id current-file-id :data workspace-data} workspace-libraries {:include-deleted? true})
|
||||
main-instance? (if components-v2 (ctk/main-instance? shape) true)
|
||||
|
||||
toggle-content
|
||||
|
||||
Reference in New Issue
Block a user