Skip to content

Commit fbd23a7

Browse files
mneiseswannodette
authored andcommitted
CLJS-1391: Error when building for target :nodejs
Fix bug when building for target nodejs. Check if source is map before trying to assign source code to :source key.
1 parent 38c9379 commit fbd23a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@
13491349
(when-not (.exists out-file)
13501350
(util/mkdirs out-file)
13511351
(spit out-file
1352-
(cond-> (assoc js :source (deps/-source js))
1352+
(cond-> (if (map? js) (assoc js :source (deps/-source js)) js)
13531353
(:preprocess js) (js-transforms opts)
13541354
(:module-type js) (convert-js-module opts)
13551355
true deps/-source)))

0 commit comments

Comments
 (0)