mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 12:21:38 +02:00
🐛 Add a protection for some possible race condition
This commit is contained in:
parent
1d39bbaa3c
commit
8fb22b8eee
1 changed files with 39 additions and 38 deletions
|
@ -569,6 +569,7 @@
|
|||
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(when (and (some? file-id) (some? library-id)) ; Prevent race conditions while navigating out of the file
|
||||
(log/info :msg "SYNC-FILE"
|
||||
:file (dwlh/pretty-file file-id state)
|
||||
:library (dwlh/pretty-file library-id state))
|
||||
|
@ -609,7 +610,7 @@
|
|||
{:file-id file-id
|
||||
:library-id library-id})))
|
||||
(when (seq (:redo-changes library-changes))
|
||||
(rx/of (sync-file-2nd-stage file-id library-id))))))))
|
||||
(rx/of (sync-file-2nd-stage file-id library-id)))))))))
|
||||
|
||||
(defn sync-file-2nd-stage
|
||||
"If some components have been modified, we need to launch another synchronization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue