0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 11:59:17 -05:00

Merge pull request #5612 from penpot/superalex-fix-delete-page

🐛 Fix delete page navigation to first page
This commit is contained in:
Andrey Antukh 2025-01-17 15:22:20 +01:00 committed by GitHub
commit a8fd492748
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -638,6 +638,7 @@
index (d/index-of pages id)
page (get pindex id)
page (assoc page :index index)
pages (filter #(not= % id) pages)
changes (-> (pcb/empty-changes it)
(pcb/with-library-data fdata)
@ -646,7 +647,7 @@
(rx/of (dch/commit-changes changes)
(when (= id (:current-page-id state))
(dcm/go-to-workspace)))))))
(dcm/go-to-workspace {:page-id (first pages)})))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; WORKSPACE File Actions