Skip to content

Commit e962ec0

Browse files
author
dnolen
committed
users need to be able to specify host-port for source mapping to work in browser REPL.
The host and port the JS is served on may very well not match the repl port
1 parent 22ba5a6 commit e962ec0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/clojure/cljs/repl/browser.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@
227227
(cond-> column
228228
(.endsWith column ")") (string/replace ")" "")))]))
229229

230-
(defn parse-file [{:keys [host port] :as repl-env} file {:keys [asset-path] :as opts}]
231-
(let [base-url-pattern (Pattern/compile (str "http://" host ":" port "/"))]
230+
(defn parse-file [{:keys [host host-port port] :as repl-env} file {:keys [asset-path] :as opts}]
231+
(let [base-url-pattern (Pattern/compile (str "http://" host ":" (or host-port port) "/"))]
232232
(if (re-find base-url-pattern file)
233233
(-> file
234234
(string/replace base-url-pattern "")

0 commit comments

Comments
 (0)