mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
🐛 Fix validation
This commit is contained in:
parent
1ab690a408
commit
1fa8888bf3
2 changed files with 4 additions and 4 deletions
|
@ -133,7 +133,7 @@
|
|||
(report-error :component-main-external
|
||||
(str/format "Main instance should refer to a component in the same file")
|
||||
shape file page))
|
||||
(let [component (ctf/resolve-component shape file libraries {:include-deleted? true})]
|
||||
(let [component (ctf/resolve-component shape file libraries :include-deleted? true)]
|
||||
(if (nil? component)
|
||||
(report-error :component-not-found
|
||||
(str/format "Component %s not found in file" (:component-id shape) (:component-file shape))
|
||||
|
|
|
@ -126,10 +126,10 @@
|
|||
|
||||
(defn resolve-component
|
||||
"Retrieve the referenced component, from the local file or from a library"
|
||||
[shape file libraries & params]
|
||||
[shape file libraries & {:keys [include-deleted?] :or {include-deleted? false}}]
|
||||
(if (= (:component-file shape) (:id file))
|
||||
(ctkl/get-component (:data file) (:component-id shape) params)
|
||||
(get-component libraries (:component-file shape) (:component-id shape) params)))
|
||||
(ctkl/get-component (:data file) (:component-id shape) include-deleted?)
|
||||
(get-component libraries (:component-file shape) (:component-id shape) :include-deleted? include-deleted?)))
|
||||
|
||||
(defn get-component-library
|
||||
"Retrieve the library the component belongs to."
|
||||
|
|
Loading…
Add table
Reference in a new issue