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