File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 154
154
155
155
(defn history-push-state [{:as opts :keys [path fragment replace?]}]
156
156
(when (not= path (some-> js/history .-state .-path))
157
- (j/call js/history (if replace? :replaceState :pushState ) (clj->js opts) " " (str " /" path (when fragment (str " #" fragment)))) ))
157
+ (j/call js/history (if replace? :replaceState :pushState ) (clj->js opts) " " (str (.. js/document -location -origin)
158
+ " /" path (when fragment (str " #" fragment))))))
158
159
159
160
(defn handle-history-popstate [^js e]
160
161
(when-let [{:as opts :keys [path]} (js->clj (.-state e) :keywordize-keys true )]
Original file line number Diff line number Diff line change 198
198
(string? file-or-ns)
199
199
(when (fs/exists? file-or-ns)
200
200
(fs/unixify (cond->> file-or-ns
201
- (fs/absolute? file-or-ns)
201
+ (and (fs/absolute? file-or-ns)
202
+ (not (str/starts-with? (fs/relativize (fs/cwd ) file-or-ns) " .." )))
202
203
(fs/relativize (fs/cwd )))))
203
204
204
205
:else (str file-or-ns)))
You can’t perform that action at this time.
0 commit comments