🐛 Prevent ghost state on change from one file to other.

This commit is contained in:
Andrey Antukh 2020-04-15 09:27:30 +02:00
parent 5fb0c5c312
commit 1d678acdd9
2 changed files with 19 additions and 41 deletions

View file

@ -368,7 +368,9 @@
ptk/UpdateEvent
(update [_ state]
(let [local (:workspace-local state)]
(assoc-in state [:workspace-cache page-id] local)))))
(-> state
(assoc-in [:workspace-cache page-id] local)
(update :workspace-data dissoc page-id))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;