async init() {
// We need the URL from the HTML because it gets properly updated when exporting the final version
- const data = await (await fetch(this.$el.dataset.searchindex));
+ const data = await fetch(this.$el.dataset.searchindex);
+ const index = await data.text();
+ console.log(index);
// Delay miniSearch initialisation so there's less chance of animations stuttering during page loads
setTimeout(() => {
- window.minisearch = this.miniSearch = MiniSearch.loadJSON(data.text(), this.setup);
+ window.minisearch = this.miniSearch = MiniSearch.loadJSON(index, this.setup);
}, 4000);
this.medialibrary = this.$el.dataset.medialibrary;