summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-03-09 18:22:23 +0000
committerPhil Hughes <me@iamphill.com>2018-03-09 18:22:23 +0000
commit52b70f0428151dcc6f4154fa584e9478afc34e9e (patch)
treee700010a4c19371ff3fdb798e8a7518f5e71b51e /app/assets/javascripts/notes
parentf2723fc3e9c4f7923255f2644932e129a8047653 (diff)
downloadgitlab-ce-52b70f0428151dcc6f4154fa584e9478afc34e9e.tar.gz
Fixed issue notes being duplicated
Closes #44099
Diffstat (limited to 'app/assets/javascripts/notes')
-rw-r--r--app/assets/javascripts/notes/stores/actions.js2
-rw-r--r--app/assets/javascripts/notes/stores/mutations.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/stores/actions.js b/app/assets/javascripts/notes/stores/actions.js
index 42fc2a131b8..3eaae0bc683 100644
--- a/app/assets/javascripts/notes/stores/actions.js
+++ b/app/assets/javascripts/notes/stores/actions.js
@@ -197,7 +197,7 @@ const pollSuccessCallBack = (resp, commit, state, getters) => {
});
}
- commit(types.SET_LAST_FETCHED_AT, resp.lastFetchedAt);
+ commit(types.SET_LAST_FETCHED_AT, resp.last_fetched_at);
return resp;
};
diff --git a/app/assets/javascripts/notes/stores/mutations.js b/app/assets/javascripts/notes/stores/mutations.js
index 963b40be3fd..aed0a44e808 100644
--- a/app/assets/javascripts/notes/stores/mutations.js
+++ b/app/assets/javascripts/notes/stores/mutations.js
@@ -90,15 +90,15 @@ export default {
const notes = [];
notesData.forEach((note) => {
- const nn = Object.assign({}, note);
-
// To support legacy notes, should be very rare case.
if (note.individual_note && note.notes.length > 1) {
note.notes.forEach((n) => {
+ const nn = Object.assign({}, note);
nn.notes = [n]; // override notes array to only have one item to mimick individual_note
notes.push(nn);
});
} else {
+ const nn = Object.assign({}, note);
const oldNote = utils.findNoteObjectById(state.notes, note.id);
nn.expanded = oldNote ? oldNote.expanded : note.expanded;