penpot/frontend
Eva Marco 0c60db56a2
🐛 Fix multiselection error with typography texts (#9071)
* 🐛 Ensure typography-ref attrs are always present and fix nil encoding

Add :typography-ref-file and :typography-ref-id (both defaulting to nil)
to default-text-attrs so these keys are always present in text node maps,
whether or not a typography is attached.

Skip nil values in attrs-to-styles (Draft.js style encoder) and in
attrs->styles (v2 CSS custom-property mapper) so nil typography-ref
entries are never serialised to CSS.

Replace when with if/acc in get-styles-from-style-declaration to prevent
the accumulator from being clobbered to nil when a mixed-value entry is
skipped during style decoding.

* 🎉 Add test

---------

Co-authored-by: Andrey Antukh <niwi@niwi.nz>
2026-04-23 16:08:56 +02:00
..
2026-04-07 21:35:00 +02:00
2026-04-07 21:35:00 +02:00
2026-04-20 19:37:02 +02:00
2026-03-26 14:12:11 +01:00
2025-12-23 13:10:58 +01:00
2026-04-20 19:37:02 +02:00
2026-04-20 19:37:02 +02:00
2026-04-07 21:35:00 +02:00
2025-11-05 17:15:19 +01:00