Skip to content

Commit 330c365

Browse files
author
dnolen
committed
tweak cljs.util/ns->relpath so it can work sans file extension
1 parent 8971829 commit 330c365

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/clojure/cljs/util.cljc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
provide the file extension, defaults to :cljs."
7070
([ns] (ns->relpath ns :cljs))
7171
([ns ext]
72-
(str (string/replace (munge-path ns) \. \/) "." (name ext))))
72+
(cond-> (string/replace (munge-path ns) \. \/)
73+
ext (str "." (name ext)))))
7374

7475
(defn ns->source
7576
"Given a namespace as a symbol return the corresponding resource if it exists."

0 commit comments

Comments
 (0)