Skip to content

Commit 2a34c6b

Browse files
authoredSep 13, 2023
fix: make algolia search work with indices that don't return absolute urls (#2956)
closes #336, closes #805
1 parent d1d985e commit 2a34c6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/client/theme-default/components/VPAlgoliaSearchBox.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ function initialize(userOptions: DefaultTheme.AlgoliaSearchOptions) {
8484
docsearch(options)
8585
}
8686
87-
function getRelativePath(absoluteUrl: string) {
88-
const { pathname, hash } = new URL(absoluteUrl)
87+
function getRelativePath(url: string) {
88+
const { pathname, hash } = new URL(url, location.origin)
8989
return (
9090
pathname.replace(
9191
/\.html$/,

0 commit comments

Comments
 (0)
Please sign in to comment.