mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 12:01:41 +02:00
🐛 Fix problem with promises in plugins
This commit is contained in:
parent
59050a7bc6
commit
6c0dce580d
7 changed files with 23 additions and 30 deletions
|
@ -40,8 +40,7 @@
|
|||
[app.plugins.viewport :as viewport]
|
||||
[app.util.code-gen :as cg]
|
||||
[app.util.object :as obj]
|
||||
[beicon.v2.core :as rx]
|
||||
[promesa.core :as p]))
|
||||
[beicon.v2.core :as rx]))
|
||||
|
||||
;;
|
||||
;; PLUGINS PUBLIC API - The plugins will able to access this functions
|
||||
|
@ -174,7 +173,7 @@
|
|||
|
||||
:else
|
||||
(let [file-id (:current-file-id @st/state)]
|
||||
(p/create
|
||||
(js/Promise.
|
||||
(fn [resolve reject]
|
||||
(->> (dwm/upload-media-url name file-id url)
|
||||
(rx/take 1)
|
||||
|
@ -184,7 +183,7 @@
|
|||
(uploadMediaData
|
||||
[_ name data mime-type]
|
||||
(let [file-id (:current-file-id @st/state)]
|
||||
(p/create
|
||||
(js/Promise.
|
||||
(fn [resolve reject]
|
||||
(->> (dwm/process-blobs
|
||||
{:file-id file-id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue