mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
🐛 Strip nil values from saved default font data
When detaching a typography, save-font was storing nil values for typography-ref-file and typography-ref-id into the workspace global default font state. These nil values were then merged into every newly created text shape, causing the attributes to appear with nil values instead of being absent. Fix by applying d/without-nils before persisting the default font data, ensuring nil values are never stored as defaults.
This commit is contained in:
parent
b02d54b21e
commit
241a4ec2fa
@ -649,7 +649,7 @@
|
||||
(let [multiple? (->> data vals (d/seek #(= % :multiple)))]
|
||||
(cond-> state
|
||||
(not multiple?)
|
||||
(assoc-in [:workspace-global :default-font] data))))))
|
||||
(assoc-in [:workspace-global :default-font] (d/without-nils data)))))))
|
||||
|
||||
(defn apply-text-modifier
|
||||
[shape text-modifier]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user