🐛 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:
Andrey Antukh 2026-04-13 17:09:21 +00:00 committed by Eva Marco
parent b02d54b21e
commit 241a4ec2fa

View File

@ -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]