Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 60d04fe

Browse files
committed
fix test
1 parent f2ac32c commit 60d04fe

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

sphinx_search/_static/js/rtd_sphinx_search.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,14 @@ const updateUrl = () => {
8080

8181
let window_location_search = convertObjToUrlParams(url_params);
8282

83-
// new url
84-
const url = origin + path + "?" + window_location_search;
83+
// this happens during the tests,
84+
// when window.location.origin is "null" in Firefox
85+
// then correct URL is contained by window.location.pathname
86+
// which starts with "file://"
87+
let url = path + "?" + window_location_search
88+
if (origin.substring(0, 4) === 'http'){
89+
url = origin + url;
90+
}
8591

8692
// update url
8793
window.history.pushState({}, null, url);

sphinx_search/_static/js/rtd_sphinx_search.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)