Use when-not instead of single branch if-not and do
This commit is contained in:
parent
8e3279c39c
commit
b345eb824e
|
@ -148,8 +148,7 @@
|
|||
|
||||
(defn add-filter [filter-items filter-input filter-type]
|
||||
;; prevent duplicate filter strings
|
||||
(if-not (some #(= filter-input (:query %)) @filter-items)
|
||||
(do
|
||||
(when-not (some #(= filter-input (:query %)) @filter-items)
|
||||
;; if existing, remove prior filter for :slower-than
|
||||
(when (and (= :slower-than filter-type)
|
||||
(some #(= filter-type (:filter-type %)) @filter-items))
|
||||
|
@ -160,7 +159,7 @@
|
|||
:query (if (= filter-type :contains)
|
||||
(str/lower-case filter-input)
|
||||
(js/parseFloat filter-input))
|
||||
:filter-type filter-type}))))
|
||||
:filter-type filter-type})))
|
||||
|
||||
(defn render-traces [showing-traces filter-items filter-input trace-detail-expansions]
|
||||
(doall
|
||||
|
|
Loading…
Reference in New Issue