fix: block wrong indentation in queries

This commit is contained in:
Tienson Qin
2022-05-10 18:59:38 +08:00
parent 278f2ff1f9
commit 9042aa47c5
2 changed files with 16 additions and 17 deletions

View File

@@ -316,20 +316,19 @@
(or (get affected-keys (vec (rest k)))
custom?
kv?))
(util/profile (str "refresh! " (second k))
(let [{:keys [query query-fn]} cache]
(when (or query query-fn)
(try
(let [f #(execute-query! repo-url db k tx cache)]
;; Detects whether user is editing in a custom query, if so, execute the query immediately
(if (and custom?
;; modifying during cards review need to be executed immediately
(not (:cards-query? (meta query)))
(not (state/edit-in-query-component)))
(async/put! (state/get-reactive-custom-queries-chan) [f query])
(f)))
(catch js/Error e
(js/console.error e))))))))))))
(let [{:keys [query query-fn]} cache]
(when (or query query-fn)
(try
(let [f #(execute-query! repo-url db k tx cache)]
;; Detects whether user is editing in a custom query, if so, execute the query immediately
(if (and custom?
;; modifying during cards review need to be executed immediately
(not (:cards-query? (meta query)))
(not (state/edit-in-query-component)))
(async/put! (state/get-reactive-custom-queries-chan) [f query])
(f)))
(catch js/Error e
(js/console.error e)))))))))))
(defn set-key-value
[repo-url key value]