Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* src/clj/cljs/compiler.clj: remove pointless emission of "void 0;"

  • Loading branch information...
commit ac9d82c21b6082b85c3676bbb08da117987c67d6 1 parent e3c6991
David Nolen authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 src/clj/cljs/compiler.clj
View
8 src/clj/cljs/compiler.clj
@@ -189,8 +189,7 @@
~@body
(when-not (= :expr (:context env#)) (emitln ";"))))
-(defmethod emit :no-op
- [m] (emits "void 0;"))
+(defmethod emit :no-op [m])
(defmethod emit :var
[{:keys [info env] :as arg}]
@@ -322,15 +321,14 @@
(defmethod emit :def
[{:keys [name init env doc export]}]
- (if init
+ (when init
(let [mname (munge name)]
(emit-comment doc (:jsdoc init))
(emits mname)
(emits " = " init)
(when-not (= :expr (:context env)) (emitln ";"))
(when export
- (emitln "goog.exportSymbol('" (munge export) "', " mname ");")))
- (emitln "void 0;")))
+ (emitln "goog.exportSymbol('" (munge export) "', " mname ");")))))
(defn emit-apply-to
[{:keys [name params env]}]
Please sign in to comment.
Something went wrong with that request. Please try again.