Permalink
Browse files

* src/clj/cljs/compiler.clj: simplify emit :invoke conditions

  • Loading branch information...
1 parent 56edba3 commit 9fe06432b5f0d366541f67bb63494b128b56f1d5 David Nolen committed May 6, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/clj/cljs/compiler.clj
View
@@ -697,10 +697,12 @@
[f false]))))
[f false])]
(emit-wrap env
- (emits f (when-not (or fn? js?) ".call") "("
- (let [args (if (or fn? js?) args (cons "null" args))]
- (comma-sep args))
- ")"))))
+ (cond
+ (or fn? js?)
+ (emits f "(" (comma-sep args) ")")
+
+ :else
+ (emits f ".call(" (comma-sep (cons "null" args)) ")")))))
(defmethod emit :new
[{:keys [ctor args env]}]

0 comments on commit 9fe0643

Please sign in to comment.