]> _ Git - odl.git/commitdiff
wip #5120
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 18:04:59 +0000 (19:04 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 18:04:59 +0000 (19:04 +0100)
resources/js/search.js

index 54e4b0fb33895da182b50b0391f7c99604f4f0e2..7fa920436f797062b6dea90df447097cedbb548e 100644 (file)
@@ -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;