Skip to content

Commit

Permalink
Remove unnecessary test in decide function
Browse files Browse the repository at this point in the history
* If `defdecision` would specify a test function which is not a
  function or multi-fn it would be ignored.
  • Loading branch information
ordnungswidrig committed Oct 1, 2015
1 parent 198f18f commit eb9dfdb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/liberator/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@
(declare handle-exception)

(defn decide [name test then else {:keys [resource request] :as context}]
(if (or (fn? test)
(instance? clojure.lang.MultiFn test)
(contains? resource name))
(if (or test
(contains? resource name))
(try
(let [ftest (or (resource name) test)
ftest (make-function ftest)
Expand Down

0 comments on commit eb9dfdb

Please sign in to comment.