mirror of
https://github.com/penpot/penpot.git
synced 2026-09-12 15:09:38 +00:00
🐛 Fix regression on export shape on plungins API
This commit is contained in:
parent
15ed25ca79
commit
336173645e
@ -55,6 +55,7 @@
|
|||||||
[app.plugins.ruler-guides :as rg]
|
[app.plugins.ruler-guides :as rg]
|
||||||
[app.plugins.text :as text]
|
[app.plugins.text :as text]
|
||||||
[app.plugins.utils :as u]
|
[app.plugins.utils :as u]
|
||||||
|
[app.util.http :as http]
|
||||||
[app.util.object :as obj]
|
[app.util.object :as obj]
|
||||||
[beicon.v2.core :as rx]
|
[beicon.v2.core :as rx]
|
||||||
[cuerdas.core :as str]))
|
[cuerdas.core :as str]))
|
||||||
@ -1196,7 +1197,12 @@
|
|||||||
(js/Promise.
|
(js/Promise.
|
||||||
(fn [resolve reject]
|
(fn [resolve reject]
|
||||||
(->> (rp/cmd! :export payload)
|
(->> (rp/cmd! :export payload)
|
||||||
(rx/mapcat #(rp/cmd! :export {:cmd :get-resource :wait true :id (:id %) :blob? true}))
|
(rx/mapcat (fn [{:keys [uri]}]
|
||||||
|
(->> (http/send! {:method :get
|
||||||
|
:uri uri
|
||||||
|
:response-type :blob
|
||||||
|
:omit-default-headers true})
|
||||||
|
(rx/map :body))))
|
||||||
(rx/mapcat #(.arrayBuffer %))
|
(rx/mapcat #(.arrayBuffer %))
|
||||||
(rx/map #(js/Uint8Array. %))
|
(rx/map #(js/Uint8Array. %))
|
||||||
(rx/subs! resolve reject))))))))
|
(rx/subs! resolve reject))))))))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user