mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 07:21:40 -05:00
🐛 Fix issue when typography name is empty.
This commit is contained in:
parent
eb1bcfba83
commit
7014bc7a3c
2 changed files with 6 additions and 6 deletions
|
@ -436,7 +436,7 @@
|
|||
[path-name]
|
||||
(let [path-name-split (split-path path-name)
|
||||
path (str/join " / " (butlast path-name-split))
|
||||
name (last path-name-split)]
|
||||
name (or (last path-name-split) "")]
|
||||
[path name]))
|
||||
|
||||
(defn merge-path-item
|
||||
|
|
|
@ -242,11 +242,11 @@
|
|||
(watch [it state _]
|
||||
(let [[path name] (cp/parse-path-name (:name typography))
|
||||
typography (assoc typography :path path :name name)
|
||||
prev (get-in state [:workspace-data :typographies (:id typography)])
|
||||
rchg {:type :mod-typography
|
||||
:typography typography}
|
||||
uchg {:type :mod-typography
|
||||
:typography prev}]
|
||||
prev (get-in state [:workspace-data :typographies (:id typography)])
|
||||
rchg {:type :mod-typography
|
||||
:typography typography}
|
||||
uchg {:type :mod-typography
|
||||
:typography prev}]
|
||||
(rx/of (dwu/start-undo-transaction)
|
||||
(dch/commit-changes {:redo-changes [rchg]
|
||||
:undo-changes [uchg]
|
||||
|
|
Loading…
Add table
Reference in a new issue