Skip to content

Commit

Permalink
fixed error on abort
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 committed Nov 7, 2023
1 parent 37f604e commit 7deff40
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@
fetch(request, { signal })
.then(getJsonFromResponse)
.then(showResults.bind(this, searchText))
.catch(() =>
.catch((error) => {
if (error.name === 'AbortError') {
return;
}

showErrorNotification(
Translator.trans(/*@Desc("Cannot load suggestions")*/ 'autocomplete.request.error', {}, 'ibexa_search'),
),
);
);
});
};
const handleTyping = (event) => {
const searchText = event.currentTarget.value.trim();
Expand Down

0 comments on commit 7deff40

Please sign in to comment.