0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

🐛 Fix problem with import broken images

This commit is contained in:
alonso.torres 2021-09-13 11:10:32 +02:00 committed by Andrés Moya
parent fe6623b342
commit 8a158146cd
2 changed files with 5 additions and 2 deletions

View file

@ -39,6 +39,7 @@
- Fix problems with order in groups [Taiga #1960](https://tree.taiga.io/project/penpot/issue/1960)
- Fix SVG components preview [#1134](https://github.com/penpot/penpot/issues/1134)
- Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969)
- Fix problem with import broken images links [#1197](https://github.com/penpot/penpot/issues/1197)
### :arrow_up: Deps updates
### :boom: Breaking changes

View file

@ -255,7 +255,7 @@
(let [name (cip/get-image-name node)
data-uri (cip/get-image-data node)]
(->> (upload-media-files file-id name data-uri)
(rx/catch #(do (.error js/console %)
(rx/catch #(do (.error js/console "Error uploading media: " name)
(rx/of node)))
(rx/map
(fn [media]
@ -370,7 +370,9 @@
:content content
:is-local false})))
(rx/flat-map #(rp/mutation! :upload-file-media-object %))
(rx/map (constantly media))))))
(rx/map (constantly media))
(rx/catch #(do (.error js/console (str "Error uploading media: " (:name media)) )
(rx/empty)))))))
(rx/reduce fb/add-library-media file)))
(rx/of file)))