Skip to content

Commit b721daf

Browse files
author
dnolen
committed
improve cljs.closure/source-for-namespace failure checking
1 parent 3fd1b8b commit b721daf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/clj/cljs/closure.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,10 @@ should contain the source for the given namespace name."
483483
(if-let [cljs-res (io/resource relpath)]
484484
{:relative-path relpath :uri cljs-res}
485485
(let [relpath (:file (get-in @compiler-env [:js-dependency-index ns-str]))]
486-
(if-let [js-res (io/resource relpath)]
486+
(if-let [js-res (and relpath (io/resource relpath))]
487487
{:relative-path relpath :uri js-res}
488-
(throw
489-
(IllegalArgumentException. (str "Namespace " ns " does not exist"))))))))
488+
(throw
489+
(IllegalArgumentException. (str "Namespace " ns " does not exist"))))))))
490490

491491
(defn cljs-dependencies
492492
"Given a list of all required namespaces, return a list of

0 commit comments

Comments
 (0)