Skip to content

Commit

Permalink
CLJS-847: Safari toString fix
Browse files Browse the repository at this point in the history
In Safari 6.0.X address problems with using toString by using string
concatenation instead.
  • Loading branch information
David Nolen committed Aug 31, 2014
1 parent edd35fa commit 08b4b15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/clj/cljs/core.clj
Expand Up @@ -1641,3 +1641,6 @@
(lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))"
[& colls]
`(concat ~@(map #(core/list `lazy-seq %) colls)))

(defmacro js-str [s]
(core/list 'js* "''+~{}" s))
2 changes: 1 addition & 1 deletion src/cljs/cljs/core.cljs
Expand Up @@ -2037,7 +2037,7 @@ reduces them without incurring seq initialization"
([] "")
([x] (if (nil? x)
""
(.toString x)))
(cljs.core/js-str x)))
([x & ys]
(loop [sb (StringBuffer. (str x)) more ys]
(if more
Expand Down

0 comments on commit 08b4b15

Please sign in to comment.