Skip to content

Commit 86f3979

Browse files
committed
fix styles
1 parent 98cf4f4 commit 86f3979

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/renderer/app/effects.cljs

+7-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
(rf/reg-fx
2525
::persist
2626
(fn [db]
27-
(let [db (cond-> db (:active-document db) history.h/drop-rest)]
27+
(let [db (cond-> db
28+
(:active-document db)
29+
history.h/drop-rest)]
2830
(->> (select-keys db db/persistent-keys)
2931
(rf.storage/->store config/app-key)))))
3032

@@ -46,8 +48,8 @@
4648
(when (.supports js/ClipboardItem data-type)
4749
(aset blob-array data-type (js/Blob. (array data) #js {:type data-type}))))
4850
blob-array))))
49-
(.then (fn [] (when on-success (rf/dispatch on-success))))
50-
(.catch (fn [error] (when on-error (rf/dispatch (conj on-error error))))))))
51+
(.then #(when on-success (rf/dispatch on-success)))
52+
(.catch #(when on-error (rf/dispatch (conj on-error %)))))))
5153

5254
(rf/reg-fx
5355
::focus
@@ -156,5 +158,5 @@
156158
(fn [{:keys [on-success on-error]}]
157159
(-> (js/EyeDropper.)
158160
(.open)
159-
(.then (fn [color] (when on-success (rf/dispatch (conj on-success color)))))
160-
(.catch (fn [error] (when on-error (rf/dispatch (conj on-error error))))))))
161+
(.then #(when on-success (rf/dispatch (conj on-success %))))
162+
(.catch #(when on-error (rf/dispatch (conj on-error %)))))))

0 commit comments

Comments
 (0)