mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 00:26:38 +02:00
🐛 Fix delete page navigation to first page
This commit is contained in:
parent
77477e09a2
commit
6c25e18f09
1 changed files with 2 additions and 1 deletions
|
@ -638,6 +638,7 @@
|
||||||
index (d/index-of pages id)
|
index (d/index-of pages id)
|
||||||
page (get pindex id)
|
page (get pindex id)
|
||||||
page (assoc page :index index)
|
page (assoc page :index index)
|
||||||
|
pages (filter #(not= % id) pages)
|
||||||
|
|
||||||
changes (-> (pcb/empty-changes it)
|
changes (-> (pcb/empty-changes it)
|
||||||
(pcb/with-library-data fdata)
|
(pcb/with-library-data fdata)
|
||||||
|
@ -646,7 +647,7 @@
|
||||||
|
|
||||||
(rx/of (dch/commit-changes changes)
|
(rx/of (dch/commit-changes changes)
|
||||||
(when (= id (:current-page-id state))
|
(when (= id (:current-page-id state))
|
||||||
(dcm/go-to-workspace)))))))
|
(dcm/go-to-workspace {:page-id (first pages)})))))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; WORKSPACE File Actions
|
;; WORKSPACE File Actions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue