From 0499f52f9458188f6d8284c26357418e4c729bee Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 22 Feb 2022 19:04:59 +0100 Subject: [PATCH] wip #5120 --- resources/js/search.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/search.js b/resources/js/search.js index 54e4b0f..7fa9204 100644 --- a/resources/js/search.js +++ b/resources/js/search.js @@ -19,11 +19,11 @@ export default () => ({ 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; -- 2.39.5