Skip to content

Commit

Permalink
fix: make search box relative to <base> tag (leanprover#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen authored Feb 3, 2025
1 parent b3c39de commit 979086c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion static/search/search-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ class SearchBox {
* @param {SearchResult} result
*/
confirmResult(result) {
window.location.assign(result.item.address);
const base = document.querySelector('base');
if (base) {
window.location.assign(base.href + result.item.address);
} else {
window.location.assign(result.item.address);
}
}

/**
Expand Down

0 comments on commit 979086c

Please sign in to comment.