mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
A view URL without a page-id crashed builds with assertions enabled: the viewer passes a nil page-id to `initialize`, whose schema accepted a missing key but not a nil value. Release builds skip that check and draw the first page, but every viewer event reads the page from the route, so zoom to fit and fill, the next-board arrow, Navigate To interactions, and comment pins did not work. `initialize` now accepts a nil page-id, `fetch-bundle` makes it optional, and `bundle-fetched` replaces a route without page-id by one naming the file's first page. The viewer then initializes again on the completed route, as it does when the user changes page. A file with no pages keeps its route. AI-assisted-by: claude-opus-5-5 Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>