diff --git a/src/components/DictionaryView.vue b/src/components/DictionaryView.vue index 32ae66c00b912c304c07b65049b7b6669586ab5e..fa3e948065c44373b0ac2cea392dbccb948eb184 100644 --- a/src/components/DictionaryView.vue +++ b/src/components/DictionaryView.vue @@ -226,7 +226,8 @@ export default { Promise.all(unwrapped.map((article) => { return axios.get(`${api_endpoint}/${article.dictionary}/article/${article.id}`) - })).then((response) => { + })) + .then((response) => { self.search_results = response.map((element, index) => { return Object.assign(element.data, {source: source, match: event.match, dictionary: unwrapped[index].dictionary}) }) @@ -234,7 +235,7 @@ export default { self.error = null }) - .catch(function(error){ + .catch(error => { self.search_results = [] if (error.response) { self.error = "Noe gikk galt på serversiden" @@ -242,7 +243,7 @@ export default { self.error = "Nettverksproblemer, prøv igjen" } }) - .then(function(){ + .then(() => { self.$plausible.trackEvent('dropdown selection', {props: {query: event.q, match: event.match}}) self.waiting_for_articles = false history.replaceState({article: self.article, search_results: self.search_results, lang: self.lang, error: self.error}, '')