Prechádzať zdrojové kódy

refactor: remove unnecessary type metadata

charlie 2 rokov pred
rodič
commit
323c3eff48

+ 3 - 4
src/main/frontend/components/file_sync.cljs

@@ -546,11 +546,10 @@
                           (-> (if empty-dir?
                                 (p/resolved nil)
                                 (fs-sync/read-graphs-txid (config/get-local-repo root)))
-                              (p/then (fn [^js info]
+                              (p/then (fn [{select-graph-uuid :graph-uuid}]
                                         (when (and (not empty-dir?)
-                                                   (or (nil? info)
-                                                       (nil? (:graph-uuid info))
-                                                       (not= (:graph-uuid info) (:GraphUUID graph))))
+                                                   (or (nil? select-graph-uuid)
+                                                       (not= select-graph-uuid (:GraphUUID graph))))
                                           (if (js/confirm "This directory is not empty, are you sure to sync the remote graph to it? Make sure to back up the directory first.")
                                             (p/resolved nil)
                                             (throw (js/Error. nil)))))))