mirror of
https://github.com/penpot/penpot.git
synced 2025-02-25 00:06:09 -05:00
Merge pull request #3582 from penpot/superalex-fix-invalid-comments-when-delete-page
🐛 Fix deleted pages comments shown in right sidebar
This commit is contained in:
commit
95d80c9578
1 changed files with 3 additions and 2 deletions
|
@ -279,8 +279,9 @@
|
|||
(assoc-in (conj path :position) (:position comment-thread))
|
||||
(assoc-in (conj path :frame-id) (:frame-id comment-thread))))))
|
||||
(fetched [[users comments] state]
|
||||
(let [pages (get-in state [:workspace-data :pages-index])
|
||||
comments (filter #(some? (get pages (:page-id %))) comments)
|
||||
(let [pages (-> (get-in state [:workspace-data :pages])
|
||||
set)
|
||||
comments (filter #(contains? pages (:page-id %)) comments)
|
||||
state (-> state
|
||||
(assoc :comment-threads (d/index-by :id comments))
|
||||
(update :current-file-comments-users merge (d/index-by :id users)))]
|
||||
|
|
Loading…
Add table
Reference in a new issue