diff options
Diffstat (limited to 'app/assets/javascripts/milestones')
-rw-r--r-- | app/assets/javascripts/milestones/components/milestone_combobox.vue | 3 | ||||
-rw-r--r-- | app/assets/javascripts/milestones/stores/mutations.js | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/milestones/components/milestone_combobox.vue b/app/assets/javascripts/milestones/components/milestone_combobox.vue index e8499015210..a840e696386 100644 --- a/app/assets/javascripts/milestones/components/milestone_combobox.vue +++ b/app/assets/javascripts/milestones/components/milestone_combobox.vue @@ -125,8 +125,7 @@ export default { // This method is defined here instead of in `methods` // because we need to access the .cancel() method // lodash attaches to the function, which is - // made inaccessible by Vue. More info: - // https://stackoverflow.com/a/52988020/1063392 + // made inaccessible by Vue. this.debouncedSearch = debounce(function search() { this.search(this.searchQuery); }, SEARCH_DEBOUNCE_MS); diff --git a/app/assets/javascripts/milestones/stores/mutations.js b/app/assets/javascripts/milestones/stores/mutations.js index 3a7babf6fa0..1f88c0a1ea6 100644 --- a/app/assets/javascripts/milestones/stores/mutations.js +++ b/app/assets/javascripts/milestones/stores/mutations.js @@ -38,7 +38,7 @@ export default { [types.RECEIVE_PROJECT_MILESTONES_SUCCESS](state, response) { state.matches.projectMilestones = { list: response.data.map(({ title }) => ({ title })), - totalCount: parseInt(response.headers['x-total'], 10), + totalCount: parseInt(response.headers['x-total'], 10) || response.data.length, error: null, }; }, @@ -52,7 +52,7 @@ export default { [types.RECEIVE_GROUP_MILESTONES_SUCCESS](state, response) { state.matches.groupMilestones = { list: response.data.map(({ title }) => ({ title })), - totalCount: parseInt(response.headers['x-total'], 10), + totalCount: parseInt(response.headers['x-total'], 10) || response.data.length, error: null, }; }, |