Skip to content

Commit 43bc148

Browse files
committed
continue to allow :main to be a string
1 parent 3d44a6f commit 43bc148

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,10 +2193,11 @@
21932193

21942194
(defn check-main [{:keys [main] :as opts}]
21952195
(when main
2196-
(assert (symbol? main)
2197-
(format ":main must be a symbol, got %s instead" main))
2198-
(assert (not (string/starts-with? (str main) "'"))
2199-
(format ":main must be an unquoted symbol, got %s instead" main))))
2196+
(assert (or (symbol? main) (string? main))
2197+
(format ":main must be a symbol or string, got %s instead" main))
2198+
(when (symbol? main)
2199+
(assert (not (string/starts-with? (str main) "'"))
2200+
(format ":main must be an unquoted symbol, got %s instead" main)))))
22002201

22012202
(defn check-preloads [{:keys [preloads optimizations] :as opts}]
22022203
(when (and (some? preloads)

0 commit comments

Comments
 (0)