Sfoglia il codice sorgente

chore: remove redundant doall

Yukun Guo 5 anni fa
parent
commit
8963e23766
1 ha cambiato i file con 5 aggiunte e 6 eliminazioni
  1. 5 6
      src/main/frontend/handler/file.cljs

+ 5 - 6
src/main/frontend/handler/file.cljs

@@ -206,11 +206,10 @@
           git-add-f (fn []
                       (let [add-helper
                             (fn []
-                              (doall
-                               (map
-                                (fn [[path content]]
-                                  (git-handler/git-add repo path update-status?))
-                                files)))]
+                              (map
+                               (fn [[path content]]
+                                 (git-handler/git-add repo path update-status?))
+                               files))]
                         (-> (p/all (add-helper))
                             (p/then (fn [_]
                                       (when git-add-cb
@@ -224,7 +223,7 @@
                                                (let [original-content (get file->content path)]
                                                  [path original-content content])) files)]
                           (history/add-history! repo files-tx))))]
-      (-> (p/all (doall (map write-file-f files)))
+      (-> (p/all (map write-file-f files))
           (p/then (fn []
                     (git-add-f)
                     ;; TODO: save logseq/metadata