Skip to content

Commit 90bcf2b

Browse files
author
dnolen
committed
preserve old cljs.analyze.api/analyze behavior
1 parent 49b9304 commit 90bcf2b

File tree

1 file changed

+4
-1
lines changed
  • src/main/clojure/cljs/analyzer

1 file changed

+4
-1
lines changed

src/main/clojure/cljs/analyzer/api.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@
6969
([env form name] (analyze env form name nil))
7070
([env form name opts] (analyze env/*compiler* env form name opts))
7171
([state env form name opts]
72-
(env/with-compiler-env state
72+
(if state
73+
(env/with-compiler-env state
74+
(binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
75+
(ana/analyze env form name opts)))
7376
(binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)]
7477
(ana/analyze env form name opts)))))
7578

0 commit comments

Comments
 (0)