Merge pull request #2455 from robertkleinschuster/fix-comment-timestamps-seek

fix safari "SyntaxError: Invalid regular expression: invalid group sp…
This commit is contained in:
Kavin
2023-05-31 17:57:12 +01:00
committed by GitHub
4 changed files with 56 additions and 33 deletions

View File

@@ -51,11 +51,12 @@ export default {
if (this.getPreferenceBoolean("searchHistory", false))
this.searchSuggestions = JSON.parse(localStorage.getItem("search_history")) ?? [];
} else {
this.searchSuggestions = (
await this.fetchJson(this.apiUrl() + "/opensearch/suggestions", {
query: this.searchText,
})
)?.[1];
this.searchSuggestions =
(
await this.fetchJson(this.apiUrl() + "/opensearch/suggestions", {
query: this.searchText,
})
)?.[1] ?? [];
}
this.searchSuggestions.unshift(this.searchText);
this.setSelected(0);