mirror of https://github.com/logseq/logseq
fix(electron): avoid notifying destroyed window
parent
414eaf9691
commit
a393d9f933
|
@ -16,9 +16,10 @@
|
|||
|
||||
(defonce file-watcher-chan "file-watcher")
|
||||
(defn send-file-watcher! [^js win type payload]
|
||||
(.. win -webContents
|
||||
(send file-watcher-chan
|
||||
(bean/->js {:type type :payload payload}))))
|
||||
(when-not (.isDestroyed win)
|
||||
(.. win -webContents
|
||||
(send file-watcher-chan
|
||||
(bean/->js {:type type :payload payload})))))
|
||||
|
||||
(defn- publish-file-event!
|
||||
[win dir path event]
|
||||
|
|
Loading…
Reference in New Issue