Skip to content

Commit 154b19a

Browse files
committed
coerce setTimeout result to boolean, fix for CLJS-3274 (running tests w/ recent WebKit)
1 parent ffbdf90 commit 154b19a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,16 @@
7474
Strings which should be printed." :dynamic true}
7575
*print-fn* nil)
7676

77+
(declare boolean)
78+
7779
(defn ^{:doc "Arranges to have tap functions executed via the supplied f, a
7880
function of no arguments. Returns true if successful, false otherwise." :dynamic true}
7981
*exec-tap-fn*
8082
[f]
8183
(and
82-
(exists? js/setTimeout)
83-
(js/setTimeout f 0)
84-
true))
84+
(exists? js/setTimeout)
85+
;; See CLJS-3274 - workaround for recent WebKit releases
86+
(boolean (js/setTimeout f 0))))
8587

8688
(defonce
8789
^{:doc "Each runtime environment provides a different way to print error output.

0 commit comments

Comments
 (0)