Merge pull request #6756 from penpot/superalex-fix-empty-fills

🐛 Fix empty fills
This commit is contained in:
Aitor Moreno 2025-06-23 11:31:34 +02:00 committed by GitHub
commit 21fd56076c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -245,7 +245,8 @@
(defn set-shape-fills
[shape-id fills]
(when (not-empty? fills)
(if (empty? fills)
(h/call wasm/internal-module "_clear_shape_fills")
(let [fills (take types.fill/MAX-FILLS fills)
image-fills (filter :fill-image fills)
offset (mem/alloc-bytes (* (count fills) sr-fills/FILL-BYTE-SIZE))