🐛 Ensure trailing forward slash in baseURL during search index build.

Hopefully fixes issue #223, where search functionality was broken from website deployed to netlify
pull/224/head
Elias Olofsson 2022-06-21 15:08:26 +02:00
parent ba7d006681
commit 71dae159ca
1 changed files with 1 additions and 0 deletions

View File

@ -107,6 +107,7 @@ function fetchJSON(path, callback) {
function buildIndex() { function buildIndex() {
var baseURL = wrapper.getAttribute("data-url"); var baseURL = wrapper.getAttribute("data-url");
baseURL = baseURL.replace(/\/?$/, '/');
fetchJSON(baseURL + "index.json", function (data) { fetchJSON(baseURL + "index.json", function (data) {
var options = { var options = {
shouldSort: true, shouldSort: true,