mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 06:20:32 +00:00
The changes builder getters now assert that their context was given, but prepare-restore-component and generate-delete-shapes relied on them returning nil to fall back to other data. The workspace restores components with changes that carry no library data, so restoring a main component or a variant from one of its copies failed. Add has-library-data?, has-objects? and has-page? to the changes builder, and check them in those fallbacks before calling the getters. Add tests that restore a component, and a variant whose container was deleted, with changes that carry no library data, as the workspace does. AI-assisted-by: claude-opus-5-5