Skip to content

Commit

Permalink
GH-882 Follow-up: Fix search for websites using subpaths in baseURL
Browse files Browse the repository at this point in the history
Fixes an oversight in the previous patch that caused the
index file not being separated from the location path.

Fixes #882

Signed-off-by: Olaf Lessenich <[email protected]>
  • Loading branch information
xai committed Dec 19, 2022
1 parent 047ce89 commit c339683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SynaSearch {
return callback(this.indexCache);
}

$.ajax({ method: 'get', url: (window.location.origin + window.location.pathname).replace(/[\/]search[\/]$/, '') + 'index.json' }).then((data) => {
$.ajax({ method: 'get', url: (window.location.origin + window.location.pathname).replace(/[\/]search[\/]$/, '/') + 'index.json' }).then((data) => {
this.indexCache = data;
callback(data);
});
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/syna-search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c339683

Please sign in to comment.