diff --git a/ext/autocomplete/script.js b/ext/autocomplete/script.js index ecb9fdd4..35eb01f4 100644 --- a/ext/autocomplete/script.js +++ b/ext/autocomplete/script.js @@ -42,7 +42,7 @@ function updateCompletions(element) { } else { element.completer_timeout = setTimeout(() => { - fetch(document.body.getAttribute("data-base-href") + '/api/internal/autocomplete?s=' + word).then( + fetch((document.body.getAttribute("data-base-href") ?? "") + '/api/internal/autocomplete?s=' + word).then( (response) => response.json() ).then((json) => { if(element.selected_completion !== -1) {