From ef8780f8064dab52bf7f22631bb8ee7bc0271035 Mon Sep 17 00:00:00 2001 From: Evan Rubinton Date: Mon, 3 Oct 2016 12:43:09 -0400 Subject: [PATCH] Use interceptor factory(after) in reagent6/events.cljs --- resources/cljs-reagent6/events.cljs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/resources/cljs-reagent6/events.cljs b/resources/cljs-reagent6/events.cljs index 363c6c4..7c6df28 100644 --- a/resources/cljs-reagent6/events.cljs +++ b/resources/cljs-reagent6/events.cljs @@ -1,6 +1,6 @@ (ns $PROJECT_NAME_HYPHENATED$.events (:require - [re-frame.core :refer [reg-event-db ->interceptor]] + [re-frame.core :refer [reg-event-db after]] [clojure.spec :as s] [$PROJECT_NAME_HYPHENATED$.db :as db :refer [app-db]])) @@ -16,12 +16,9 @@ (throw (ex-info (str "Spec check failed: " explain-data) explain-data))))) (def validate-spec - (->interceptor - :id :validate-spec - :after (fn [context] - (if goog.DEBUG - (check-and-throw ::db/app-db (get-in context [:effects :db]))) - context))) + (if goog.DEBUG + (after (partial check-and-throw ::db/app-db)) + [])) ;; -- Handlers --------------------------------------------------------------