mirror of
https://github.com/penpot/penpot.git
synced 2026-07-29 17:36:17 +00:00
commit
419cc2e848
@ -474,7 +474,14 @@
|
|||||||
[{:keys [data features] :as file} libraries]
|
[{:keys [data features] :as file} libraries]
|
||||||
(when (contains? features "components/v2")
|
(when (contains? features "components/v2")
|
||||||
(doseq [page (filter :id (ctpl/pages-seq data))]
|
(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))]
|
(doseq [component (vals (:components data))]
|
||||||
(validate-component! component file)))
|
(validate-component! component file)))
|
||||||
|
|||||||
@ -428,7 +428,7 @@
|
|||||||
shape (first shapes)
|
shape (first shapes)
|
||||||
id (:id shape)
|
id (:id shape)
|
||||||
shape-name (:name 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)
|
main-instance? (if components-v2 (ctk/main-instance? shape) true)
|
||||||
|
|
||||||
toggle-content
|
toggle-content
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user