mirror of
https://github.com/penpot/penpot.git
synced 2025-02-25 00:06:09 -05:00
🐛 Fix wrong reference to page-id (cause of the race conditions).
This commit is contained in:
parent
fc734328cb
commit
5499eb6018
1 changed files with 2 additions and 4 deletions
|
@ -457,7 +457,7 @@
|
|||
ptk/WatchEvent
|
||||
(watch [_ state stream]
|
||||
(let [session-id (:session-id state)
|
||||
page (:workspace-page state)
|
||||
page (get-in state [:pages page-id])
|
||||
changes (->> changes
|
||||
(mapcat identity)
|
||||
(map #(assoc % :session-id session-id))
|
||||
|
@ -1606,10 +1606,8 @@
|
|||
(ptk/reify ::changes-commited
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(let [page-id (::page-id state)
|
||||
session-id (:session-id state)
|
||||
(let [session-id (:session-id state)
|
||||
state (-> state
|
||||
(assoc-in [:workspace-page :revn] revn)
|
||||
(assoc-in [:pages page-id :revn] revn))
|
||||
changes (filter #(not= session-id (:session-id %)) changes)]
|
||||
(-> state
|
||||
|
|
Loading…
Add table
Reference in a new issue