Skip to content

Commit

Permalink
add port in the baseurl
Browse files Browse the repository at this point in the history
  • Loading branch information
Ankit Kumar committed Aug 4, 2022
1 parent f91272d commit c1f36ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions static/scripts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ function showSearch() {

async function fetchAllData() {
// eslint-disable-next-line no-undef
const { hostname, protocol } = location;
const { hostname, protocol, port } = location;

// eslint-disable-next-line no-undef
const base = protocol + '//' + hostname + baseURL;
const base = protocol + '//' + hostname + (port !== '' ? ':' + port : '') + baseURL;
// eslint-disable-next-line no-undef
const url = new URL('data/search.json', base);
const result = await fetch(url);
Expand Down
15 changes: 5 additions & 10 deletions static/scripts/search.min.js

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

0 comments on commit c1f36ec

Please sign in to comment.