diff options
Diffstat (limited to 'app/assets/javascripts/header_search/store/mutations.js')
-rw-r--r-- | app/assets/javascripts/header_search/store/mutations.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/header_search/store/mutations.js b/app/assets/javascripts/header_search/store/mutations.js index 92948bec515..19b4d4ec330 100644 --- a/app/assets/javascripts/header_search/store/mutations.js +++ b/app/assets/javascripts/header_search/store/mutations.js @@ -8,9 +8,11 @@ export default { }, [types.RECEIVE_AUTOCOMPLETE_SUCCESS](state, data) { state.loading = false; - state.autocompleteOptions = data.map((d, i) => { - return { html_id: `autocomplete-${d.category}-${i}`, ...d }; - }); + state.autocompleteOptions = [...state.autocompleteOptions].concat( + data.map((d, i) => { + return { html_id: `autocomplete-${d.category}-${i}`, ...d }; + }), + ); state.autocompleteError = false; }, [types.RECEIVE_AUTOCOMPLETE_ERROR](state) { |