Correct use of swap!
This commit is contained in:
parent
0bf8344c62
commit
e5309fcd69
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@
|
|||
(defmethod handle-event :diff [{:keys [hash diff states shadow client? state] :as msg}]
|
||||
(let [history-shadow (sync/get-history-state states hash)]
|
||||
(if history-shadow
|
||||
(let [new-state (swap! diff/patch-state state diff)
|
||||
(let [new-state (swap! state diff/patch-state diff)
|
||||
new-states (sync/add-history-state states new-state)
|
||||
new-shadow (diff/patch-state history-shadow diff)
|
||||
new-diff (diff/diff-states new-shadow new-state)
|
||||
|
|
Loading…
Reference in a new issue