mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
🐛 Fix problem with export
This commit is contained in:
parent
30cd499014
commit
7c5d00f8a4
1 changed files with 9 additions and 16 deletions
|
@ -20,22 +20,15 @@
|
|||
|
||||
(defn request-export
|
||||
[shape exports]
|
||||
(let [result-stream
|
||||
(->> st/stream
|
||||
(rx/filter dwp/shapes-persited-event?)
|
||||
(rx/take 1)
|
||||
(rx/flat-map
|
||||
#(rp/query!
|
||||
:export
|
||||
{:page-id (:page-id shape)
|
||||
:file-id (:file-id shape)
|
||||
:object-id (:id shape)
|
||||
:name (:name shape)
|
||||
:exports exports})))]
|
||||
|
||||
;; Force a persist before exporting otherwise the exported shape could be outdated
|
||||
(st/emit! ::dwp/force-persist)
|
||||
result-stream))
|
||||
;; Force a persist before exporting otherwise the exported shape could be outdated
|
||||
(st/emit! ::dwp/force-persist)
|
||||
(rp/query!
|
||||
:export
|
||||
{:page-id (:page-id shape)
|
||||
:file-id (:file-id shape)
|
||||
:object-id (:id shape)
|
||||
:name (:name shape)
|
||||
:exports exports}))
|
||||
|
||||
(mf/defc exports-menu
|
||||
[{:keys [shape page-id file-id] :as props}]
|
||||
|
|
Loading…
Add table
Reference in a new issue