mirror of
https://github.com/penpot/penpot.git
synced 2026-06-16 04:12:03 +00:00
The rasterizer's create-image function was clearing image.src in its Rx teardown cleanup. This caused the decoded pixel data to be discarded before downstream operators (drawImage / createImageBitmap) could read it, resulting in a browser NotReadableError. Changes: - Remove image.src = "" from cleanup; the image element will be garbage collected naturally. Event handler nulling is kept to break circular references. - Add dimension validation in svg-get-adjusted-size to return nil for zero/NaN dimensions instead of producing invalid sizes. - Add fallback in svg-set-intrinsic-size! to use [max max] when SVG dimensions can't be determined. Error occurred in production (2.16.0-RC10) during thumbnail generation in the workspace. Signed-off-by: Andrey Antukh <niwi@niwi.nz>