mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 10:07:14 +02:00
🐛 Fix error streen when uploading wrong SVG
This commit is contained in:
parent
7b72906096
commit
6962e15b6d
4 changed files with 103 additions and 93 deletions
|
@ -820,6 +820,10 @@
|
|||
(defn line->path [{:keys [attrs] :as node}]
|
||||
(let [tag :path
|
||||
{:keys [x1 y1 x2 y2]} attrs
|
||||
x1 (or x1 0)
|
||||
y1 (or y1 0)
|
||||
x2 (or x2 0)
|
||||
y2 (or y2 0)
|
||||
attrs (-> attrs
|
||||
(dissoc :x1 :x2 :y1 :y2)
|
||||
(assoc :d (str "M" x1 "," y1 " L" x2 "," y2)))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue