mirror of
https://github.com/penpot/penpot.git
synced 2025-06-14 02:31:37 +02:00
🐛 Fix deleted pages comments shown in right sidebar
This commit is contained in:
parent
c53b6117c0
commit
0c5c04e58a
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 :position) (:position comment-thread))
|
||||||
(assoc-in (conj path :frame-id) (:frame-id comment-thread))))))
|
(assoc-in (conj path :frame-id) (:frame-id comment-thread))))))
|
||||||
(fetched [[users comments] state]
|
(fetched [[users comments] state]
|
||||||
(let [pages (get-in state [:workspace-data :pages-index])
|
(let [pages (-> (get-in state [:workspace-data :pages])
|
||||||
comments (filter #(some? (get pages (:page-id %))) comments)
|
set)
|
||||||
|
comments (filter #(contains? pages (:page-id %)) comments)
|
||||||
state (-> state
|
state (-> state
|
||||||
(assoc :comment-threads (d/index-by :id comments))
|
(assoc :comment-threads (d/index-by :id comments))
|
||||||
(update :current-file-comments-users merge (d/index-by :id users)))]
|
(update :current-file-comments-users merge (d/index-by :id users)))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue