mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
⚡ Do not refetch data: URIs
This commit is contained in:
parent
b98f693959
commit
95d73494d6
1 changed files with 6 additions and 4 deletions
|
@ -98,10 +98,12 @@
|
|||
"Updates an image in an SVG to a Data URI."
|
||||
[image]
|
||||
(if-let [href (dom/get-attribute image "href")]
|
||||
(->> (fetch-as-data-uri href)
|
||||
(rx/map (fn [url]
|
||||
(dom/set-attribute! image "href" url)
|
||||
image)))
|
||||
(if (str/starts-with? href "data:")
|
||||
(rx/of image)
|
||||
(->> (fetch-as-data-uri href)
|
||||
(rx/map (fn [url]
|
||||
(dom/set-attribute! image "href" url)
|
||||
image))))
|
||||
(rx/empty)))
|
||||
|
||||
(defn- svg-resolve-images!
|
||||
|
|
Loading…
Reference in a new issue