Skip to content

Commit e7351a2

Browse files
author
dnolen
committed
fix CLJS-1663 regression
1 parent b93beee commit e7351a2

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/main/cljs/cljs/spec/test.cljs

+11-8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
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]
@@ -103,14 +104,16 @@
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]

0 commit comments

Comments
 (0)