summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/components/issue_notes_app.vue11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes/components/issue_notes_app.vue b/app/assets/javascripts/notes/components/issue_notes_app.vue
index 8ea4c33c4e7..77e2ae4dc1f 100644
--- a/app/assets/javascripts/notes/components/issue_notes_app.vue
+++ b/app/assets/javascripts/notes/components/issue_notes_app.vue
@@ -79,16 +79,18 @@
return note.individual_note ? note.notes[0] : note;
},
fetchNotes() {
- this.actionFetchNotes(this.getNotesDataByProp('discussionsPath'))
+ return this.actionFetchNotes(this.getNotesDataByProp('discussionsPath'))
.then(() => {
- this.isLoading = false;
-
// Scroll to note if we have hash fragment in the page URL
this.$nextTick(() => {
this.checkLocationHash();
});
})
- .catch(() => Flash('Something went wrong while fetching issue comments. Please try again.'));
+ .catch(() => Flash('Something went wrong while fetching issue comments. Please try again.'))
+ .then(() => {
+ this.isLoading = false;
+ this.initPolling();
+ });
},
initPolling() {
this.setLastFetchedAt(this.getNotesDataByProp('lastFetchedAt'));
@@ -112,7 +114,6 @@
},
mounted() {
this.fetchNotes();
- this.initPolling();
const parentElement = this.$el.parentElement;
if (parentElement &&