File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 99(ns cljs.spec.test
1010 (:require-macros [cljs.spec.test :as m :refer [with-instrument-disabled]])
1111 (:require
12+ [goog.object :as gobj]
1213 [goog.userAgent.product :as product]
1314 [clojure.string :as string]
1415 [cljs.stacktrace :as st]
103104 (str " Call to " v " did not conform to spec:\n " (with-out-str (s/explain-out ed)))
104105 ed)))
105106 conformed)))]
106- (fn
107- [& args]
108- (if *instrument-enabled*
109- (with-instrument-disabled
110- (when (:args fn-spec) (conform! v :args (:args fn-spec) args args))
111- (binding [*instrument-enabled* true ]
112- (apply f args)))
113- (apply f args)))))
107+ (doto
108+ (fn
109+ [& args]
110+ (if *instrument-enabled*
111+ (with-instrument-disabled
112+ (when (:args fn-spec) (conform! v :args (:args fn-spec) args args))
113+ (binding [*instrument-enabled* true ]
114+ (apply f args)))
115+ (apply f args)))
116+ (gobj/extend f))))
114117
115118(defn- no-fspec
116119 [v spec]
You can’t perform that action at this time.
0 commit comments